lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


I just ran into a minor but confusing issue in my efforts to add
support for Lua 5.3 to a plugin (which is itself a shared library) to
an application. Simply running "make linux" did build a working Lua
5.3, but in this situation I ran into linking errors. (I guess things
are different when a shared library depends on another shared
library.) I had to add -fPIC to MYCFLAGS in src/Makefile and recompile
Lua, then I can link it into the plugin and use it without any
problem.

Not sure if this is a known problem/feature. From what I understand
-fPIC is required for shared libraries on AMD64 (but it was working
for me without it?), but carries a large performance penalty on x86.
Still it might be sensible to add it by default on 64-bit platforms.

-- 
Sent from my Game Boy.