Reaper_202307 Posted September 6 Share Posted September 6 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! Quote Link to comment Share on other sites More sharing options...
Josh Posted September 7 Share Posted September 7 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. 1 Quote 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 More sharing options...
Reaper_202307 Posted September 7 Author Share Posted September 7 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? Quote Link to comment Share on other sites More sharing options...
Josh Posted September 7 Share Posted September 7 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) Quote 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 More sharing options...
Reaper_202307 Posted September 7 Author Share Posted September 7 Alright. Once I have it fully figured out, I'll come back here and post how I did it for others who want to use it. If I can get both SDL2 and the Lua bindings working, I imagine things will run smoother for me. Thanks! Quote Link to comment Share on other sites More sharing options...
Recommended Posts
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.