|
Bugzilla – Full Text Bug Listing |
| Summary: | Add dynamic loading capability for lua | ||
|---|---|---|---|
| Product: | [openSUSE] SUSE LINUX 10.0 | Reporter: | William Fulton <william> |
| Component: | Development | Assignee: | Marian Jancar <mjancar> |
| Status: | RESOLVED FIXED | QA Contact: | E-mail List <qa-bugs> |
| Severity: | Enhancement | ||
| Priority: | P5 - None | CC: | pth |
| Version: | unspecified | ||
| Target Milestone: | --- | ||
| Hardware: | i586 | ||
| OS: | SuSE Pro 9.3 | ||
| Whiteboard: | |||
| Found By: | Other | Services Priority: | |
| Business Priority: | Blocker: | --- | |
| Marketing QA Status: | --- | IT Deployment: | --- |
| Attachments: | tarball as described earlier for testing dynamic libraries | ||
|
Description
William Fulton
2005-08-23 20:04:14 UTC
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 |