Thursday, 10 September 2015

Re: [gccsdk] #include

On 10/09/15 18:56, Gavin Wraith wrote:
> I am getting this error
>
> gcc -std=gnu99 -o lua600 -DRISCOS -mfpu=vfp lua.o liblua -lm
> liblua(loadlib.o): In function `lookforfunc':
> loadlib.c:(.text+0x56c): undefined reference to `dlsym'
> loadlib.c:(.text+0x5a0): undefined reference to `dlerror'
> loadlib.c:(.text+0x5d0): undefined reference to `dlopen'
> loadlib.c:(.text+0x64c): undefined reference to `dlerror'
> liblua(loadlib.o): In function `gctm':
> loadlib.c:(.text+0x834): undefined reference to `dlclose'
> collect2: error: ld returned 1 exit status
> make: *** [lua600] Error 1
>
> which looks as if GCC is not #including <dlfcn.h>. I note that there is
> a file "dlfcn" in !GCC.arm-unknown-riscos.include.h . Should I be
> feeding something to the -lm flag to get this?

This is a linker error, you just need to add -ldl to your link
line above so that libdl (which provides these symbols) can be linked
in.

Lee.


_______________________________________________
GCCSDK mailing list gcc@gccsdk.riscos.info
Bugzilla: http://www.riscos.info/bugzilla/index.cgi
List Info: http://www.riscos.info/mailman/listinfo/gcc
Main Page: http://www.riscos.info/index.php/GCCSDK

No comments:

Post a Comment