read this tutorial fully - and you should get your answer: http://users.actcom.co.il/~choo/lupg/tutorials/libraries/unix-c-libraries.html in particular, the answer is in section 8.1 --guy On 07/10/2013 09:31 PM, Diego Iastrubni wrote:
Hi all, I have been figthing this nice problem at work, which I would like someone to help me. Basically, I have several static libs (liba... libk) which I need to link to my program. My program needs liba, which in turn needs libb.. which in turn needs libk. The last libk needs symbols from liba.. and this is where it gets funky. While linking g++ complains that symbols are missing ... and from ar+nm I see that those symbols are avarilable on liba. My solution was to g++ -o blabla $(OBJS) liba.a libb.a l...libk.a liba.a I know that using -L -l does not work as well, at I do need to link liba.a twice. I can reproduce this on Ubuntu 10.04 64bit (default toolchain, gcc 4.6) and in Android's NDK (using all availble toolchains 4.4.3, 4.6 and clang 3.2). Can anyone explain why am I seeing this problem? - diego _______________________________________________ Linux-il mailing list Linux-il@cs.huji.ac.il http://mailman.cs.huji.ac.il/mailman/listinfo/linux-il
_______________________________________________ Linux-il mailing list Linux-il@cs.huji.ac.il http://mailman.cs.huji.ac.il/mailman/listinfo/linux-il