From: John L. <jla...@gm...> - 2015-03-05 04:41:42
|
On Sun, Jan 25, 2015 at 12:55 PM, Ulrich Schmidt <u.s...@gm...> wrote: > Hi. > I installed Debian on a tiny pc. Caused by the fact jessie has packages for > lua, luajit, rockspec and so on, installing a lua environment is a easy and > quick task. wxWidgets-3.0.2 are available too. > Unzipping wxlua, running cmake and compiling wxlua is easy too. (I wish it > would be so easy on windows too.) > > Anyway there are 2 questions remaining: > > - The resulting lua module is named liblua.so instead wx.so. What is the > idea > behind? I renamed libwx.so to wx.so to allow standard cpath to work. > > CMake prepends 'lib' to the name by default and I see that for the Mingw build I do remove it. I'm not sure why I didn't do the same for Linux. I think the right thing to do would be to actually name the 'wx.so' lib with the Lua and wxWidgets versions and then symlink wx.so to it as most other libs do. > - make generates libwx.so + libwxlua_lua51-wx30gtk2u-2.8.12.3.so > Why is there this libwxlua_lua51-wx30gtk2u-2.8.12.3.so? Is it possible to > compile libwxlua_lua51-wx30gtk2u-2.8.12.3.so into (lib)wx.so? If not, > where is > a good place to store libwxlua_lua51-wx30gtk2u-2.8.12.3.so? > > In order to use Lua's 'require' you need to have the lua exe linked to a shared lua.so and the lib you want to 'require' also linked to the same lua.so. If you will 'require' other Lua C libs then these will also need to be built and linked against the same lua.so library. This is why the lua.so lib is not rolled into the wx.so lib and the lua exe linked only to wx.so. In terms of where to put the lua.so lib, you can put it anywhere. Use LD_LIBRARY_PATH or the program chrpath to change the rpath of the lua exe to find it. Hope this helps, John |