I've got a recipe that uses autotools. It builds ok under Poky, but if I try to 
build it on my host (e.g. when developing) then it fails to build with lots of 
'symbol not found' link errors related to libs that are on the system and which 
are in the gcc lib search path.

I've finally tracked this down to link order. The final command is of the form:

g++ -lGL -lcurl -o binary a.o b.o

If I change this to:

g++ -o binary a.o b.o -lGL -lcurl

then it builds ok.

Stranger still is the original form works fine on another system (older 
Ubuntu). The ld versions are different (2.21.53 on the one that fails, 2.20.1 
on the one that works).

Can I get autotools to always link the libraries last?

Chris Tapp

[email protected]
www.keylevel.com



_______________________________________________
yocto mailing list
[email protected]
https://lists.yoctoproject.org/listinfo/yocto

Reply via email to