lua-users home
lua-l archive

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


Thank You
now it works


Dnia 11 marca 2009 13:11 Dirk Feytons <dirk.feytons@gmail.com> napisał(a):

> On Wed, Mar 11, 2009 at 12:26 PM, Wojciech L.  J  eadruch  wrote:
> >
> >
> >
> > Dnia 11 marca 2009 12:12 Luiz Henrique de Figueiredo  napisał(a):
> >
> >> > gcc -lm -llua test.o -o hello.out
> >>
> >> Try   gcc test.o -lm -llua -o hello.out
> >>
> >
> > changing makefile due to Yours advices gave me an errors:
> >
> > gcc test.o -llua -lm -o hello.out
> > /usr/local/lib/liblua.a(loadlib.o): In function `ll_loadfunc':
> > loadlib.c:(.text+0x947): undefined reference to `dlsym'
> > loadlib.c:(.text+0x954): undefined reference to `dlerror'
> > loadlib.c:(.text+0xa2c): undefined reference to `dlopen'
> > loadlib.c:(.text+0xa41): undefined reference to `dlerror'
> > /usr/local/lib/liblua.a(loadlib.o): In function `gctm':
> > loadlib.c:(.text+0x104e): undefined reference to `dlclose'
> > collect2: ld returned 1 exit status
> > make: *** [hello.out]
> 
> You also need to link against libdl so add -ldl to your link statement:
> gcc test.o -lm -llua -ldl -o hello.out
> 
> -- 
> Dirk
>