Jump to content

Leadwerks support PIE


martyj
 Share

Recommended Posts

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.

Link to comment
Share on other sites

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.

 

  • Windows 10 Pro 64-Bit-Version
  • NVIDIA Geforce 1080 TI
Link to comment
Share on other sites

@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

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...