Hi all,
I'm trying to cross-compile a library under Linux to produce a Win32 .dll. It
needs to link in with static Boost libraries (which were also cross compiled
on the same machine) but libtool seems to refuse to do this:
*** 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.
This is the libtool command in question - but as it is all handled by autoconf
I'm not sure what I'm doing wrong!
/bin/sh ../libtool --tag=CXX --mode=link i486-mingw32-g++ -g -O2 -release
0.1 -version-info 0 -no-undefined -o libblah.la -rpath
/usr/i486-mingw32/local/lib blah1.lo blah2.lo
/usr/i486-mingw32/lib/libboost_system-mt-s.a
/usr/i486-mingw32/lib/libboost_filesystem-mt-s.a
/usr/i486-mingw32/lib/libboost_system-mt-s.a -L/usr/i486-mingw32/local/lib -lblah3
I get a second error the same as the first for the other .a file. The two
libraries are definitely not being linked, because the next step in the
process results in:
.libs/blah.o: In function `__static_initialization_and_destruction_0':
/usr/lib/gcc/i486-mingw32/4.5.2/../../../../i486-mingw32/include/boost/system/error_code.hpp:214:
undefined reference to `boost::system::generic_category()'
/usr/lib/gcc/i486-mingw32/4.5.2/../../../../i486-mingw32/include/boost/system/error_code.hpp:215:
undefined reference to `boost::system::generic_category()'
/usr/lib/gcc/i486-mingw32/4.5.2/../../../../i486-mingw32/include/boost/system/error_code.hpp:216:
undefined reference to `boost::system::system_category()'
collect2: ld returned 1 exit status
Can anyone offer any pointers as to what might be going on? Why won't libtool
use the static library?
Many thanks,
Adam.
_______________________________________________
https://lists.gnu.org/mailman/listinfo/libtool