martyj Posted September 24, 2018 Share Posted September 24, 2018 It would be helpful if we had a PIE version of leadwerks (DLL or .SO file) so that we can make our own DLL files referencing the Leadwerks.so file. I am trying to test out SWIG to add python, golang, and Java support. To this, I need to compile my library as a .so file. This can't be done, from my understanding, unless Leadwerks supports Position Independent Execution. Quote Link to comment Share on other sites More sharing options...
klepto2 Posted September 24, 2018 Share Posted September 24, 2018 Hi, i have used SWIG with Leadwerks succesfully in the past and also use it currently from time to time. You can create your own dll by using the Leadwerks.lib under windows or the Leadwerks.a under Linux. Just create a new Leadwerksproject, remove all sources and add the generated header from swig into the project. Then change the project properties to compile to a dll (or the same for linux). For getting a complete Wrapper you need to fix alot of definitions and make use of a lot of SWIG tricks. I would recommend to start only with the classes and things made public to lua and extend on that. Quote Windows 10 Pro 64-Bit-Version NVIDIA Geforce 1080 TI Link to comment Share on other sites More sharing options...
martyj Posted September 24, 2018 Author Share Posted September 24, 2018 @klepto2 I keep getting an error while linking Leadwerks about adding -fPIE to the compiler. Adding this option doesn't fix the issue. I am using CMake for the project itself. How well does SWIG work with Leadwerks? Did you compile it off of the Leadwerks.h file, or each individual class such as Window, or Entity? 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.