Bugzilla – Bug 106845
Add dynamic loading capability for lua
Last modified: 2005-09-08 13:19:15 UTC
Dynamic loading of shared objects is not enabled with your prebuilt lua binaries. Details are in Ticket [20050818990000192] that I sent to feedback@suse.de. Includes configuration details for building lua and an example to test if it is working. Many thanks
Here is the feedback ticket as not all developers have access: Dynamic loading of shared objects is not enabled with your prebuilt lua binaries. Is it possible to please enable dynamic library loading when building Lua for the next version of SuSE? This is simply done by uncommenting these lines in the lua-5.0.2/config file: LOADLIB= -DUSE_DLOPEN=1 DLLIB= -ldl I've tested that it works on an x86 system. If you need some test files, I'll put some together. Please email me back. Thanks William I've attached a tarball. It is an example (based on an example from the SWIG tool) demonstrating Lua with dynamic loading. Run make. You should get the following output if dynamic loading is working: william@jaguar:~/swig/SWIG/Examples/william/luatest> make echo you might need to adjust /usr/local/lib to point to wherever the lua libraries are installed you might need to adjust /usr/local/lib to point to wherever the lua libraries are installed g++ -c -fpic example_wrap.cxx example.cxx g++ -shared example.o example_wrap.o -L/usr/local/lib -llua -llualib -o example.so lua runme.lua Creating some objects: Created circle userdata: 0x8069ae8 Created square userdata: 0x8069b50 A total of 2 shapes were created Here is their current position: Circle = (20.000000, 30.000000) Square = (-10.000000, 5.000000) Here are some properties of the shapes: userdata: 0x8069ae8 area = 314.15926535898 perimeter = 62.831853071796 userdata: 0x8069b50 area = 100 perimeter = 40 Guess I'll clean up now 0 shapes remain Goodbye
William, could you please attach the tarball containing the example to this bug? It somehow got lost in our feedback system.
Created attachment 47422 [details] tarball as described earlier for testing dynamic libraries
Reassign to maintainer
fixed