Jump to content

Adding additional libraries to Leadwerks?


Reaper_202307
 Share

Recommended Posts

I've been spending the past few days trying to figure out how to add SDL2 to Leadwerks, as it has an additional Lua binding that would be nice to have. Not to mention the gamepad support (which is the main reason because just adding XInput only would give support for XBox 360 and Dualshock 3 controllers). Not having any experience with an engine like Leadwerks, application building, or libraries has severely impacted my ability to figure out what to do in my current situation. I know I need to include the library and expose it to Lua, but I don't know how to do that, and I don't know how to actually add it to the engine either. I've taken a look at some resources online, such as lazyfoo, and it hasn't really helped me understand.

 

Any help or other resources that could be passed along to me would be greatly appreciated. Thanks!

Link to comment
Share on other sites

Normally all you need to do is drag the .lib file into the project like a cpp file, include the header for that library from the main.cpp file, and sometimes you have to add "include search directories" in the project settings.

I do not know how SDL works, but if it can return a HWND you can probably create a Leadwerks graphics context on that.

  • Like 1

My job is to make tools you love, with the features you want, and performance you can't live without.

Link to comment
Share on other sites

From the five minutes I just spent searching, I believe it does, so there shouldn't be a problem. My question is, how do I include the search directory? I assume I add it to the 'include' folder in the Steam directory, but once it's in there, I don't know how to include it. Do I add #include "sdl2.lib" or whatever it's called to one of the files?

Link to comment
Share on other sites

You can edit the value here. Make sure you edit the configuration you are trying to compile (in the top-left corner of this window)

image.thumb.png.1101bbfe99b95a2cc3a7a97207001784.png

My job is to make tools you love, with the features you want, and performance you can't live without.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...