libtool
[Top][All Lists]
Advanced

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

Re: libtool won't link with static libraries (solved)


From: Adam Nielsen
Subject: Re: libtool won't link with static libraries (solved)
Date: Mon, 02 May 2011 12:56:38 +1000
User-agent: Mozilla/5.0 (X11; U; Linux x86_64; en-GB; rv:1.8.1.23) Gecko/20091130 Thunderbird/2.0.0.23 Mnenhy/0.7.5.0

*** Warning: Trying to link with static lib archive
/usr/i486-mingw32/lib/libboost_filesystem-mt-s.a.
*** I have the capability to make that library automatically link in when
*** you link to this library. But I can only do this if you have a
*** shared version of the library, which you do not appear to have
*** because the file extensions .a of this argument makes me believe
*** that it is just a static archive that I should not use here.

Ok, finally figured out what's going on here. libtool is in fact doing the correct thing, the static library should not be linked in with the shared library I am building (otherwise things could end up being defined multiple times when linked against the shared library.)

The undefined references I was getting were in fact unrelated to the error, and were caused by issues between Boost and mingw32. Luckily a simple #define could remove the offending code and everything compiled successfully, with the above warning still appearing.

When the time came to compile actual executables, libtool correctly linked in both the shared and static libraries as requested, so everything now works as expected!

Cheers,
Adam.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]