Problems resolving names in ld, even though libs specified in -L
Posted on 2006-06-26
I'm trying to build a package, using configure, and it all works fine with the single exception of the X libraries. There's a step to locate the libXtst.so, and the line:
gp2x-gcc -o conftest -O3 -Wall --fast-math -I$(GP2XDEV)/gp2x/include -I$(GP2XDEV)/include -lpthread -ldl conftest.c -lXtst -L$(GP2XDEV)/X11R6/lib -L$(GP2XDEV)/lib -L$(GP2XDEV)/gp2x/lib >&5
fails with a bunch of messages which are of the form:
$(GP2XDEV)/lib/gcc/gp2x/4.0.2/../../../../gp2x/bin/ld: warning: libXext.so.6, needed by $(GP2XDEV)/X11R6/lib/libXtst.so, not found (try using -rpath or -rpath-link)
When I update my LDFLAGS to include -Xlinker -rpath -Xlinker $(GP2XDEV)/X11R6/lib, I still get the error. Any ideas?
FYI: using gcc 4.0.2, ld 2.16.91 and kdrive X libs, cross-compiling for GP2X handheld. I don't think these are the cause of the problem: I think it's some linker option(s) that I haven't managed to set.
Edit: I'm not even sure that C is the right place to host this question ... perhaps platforms/Linux would be better?