lua-users home
lua-l archive

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

I might be talking nonsense here (I'm also dealing with multi-platform dll/so/dylib issues occasionally), but shouldn't somehow directly refer, or has implicit dynamic linking to

Wouldn't be worse if use GLOBAL, then you can't have the same symbol exported by two different shared libs (and that's okay for most of the cases, but how would plugins work, usually they have one entry point, and most of the time it's the same symbol name)?

On 2/23/2012 5:45 AM, Gaspard Bucher wrote:
Hi there,

I am porting lubyk to Linux and I am stuck with undefined symbols. Here
is my scenario:

lib/lubyk/ contains the symbols for TimeRef class, including (nm

00004734 T _ZN5lubyk7TimeRef7elapsedEv
000046a0 T _ZN5lubyk7TimeRefC1Ev
000046a0 T _ZN5lubyk7TimeRefC2Ev
00004704 T _ZN5lubyk7TimeRefD1Ev
00004704 T _ZN5lubyk7TimeRefD2Ev

lib/lubyk/ uses the TimeRef class.

Doing this fails under Linux but works in Mac OS X:

 > require 'lubyk.core'
Loaded again lubyk.core.
---> 0.001955           ---- Here I try to use TimeRef from
lua_open_lubyk_core and it works fine.
 > require 'lubyk.Worker'
error loading module 'lubyk.Worker' from file
/home/gaspard/git/lubyk/deploy/linux/lib/lubyk/ undefined
symbol: _ZN5lubyk7TimeRef7elapsedEv

I am clueless: it seems the loaded does not find an already
used symbol in the active binary...

Any idea ?