
We have two issues: https://svn.boost.org/trac/boost/ticket/1907 https://svn.boost.org/trac/boost/ticket/2181 that claim the the names of library files on mingw are wrong. Unfortunately, the picture is not exactly clear, and it's not even clear what the right naming would be. I'd appreciate if somebody who actually uses mingw could clarify these points: 1. Currently, we use the same naming on mingw as on windows -- foo.dll and foo.lib for shared libs and import libs, and libfoo.lib for static library. Is this OK? 2. Are the search rules listed in tools/build/v2/tools/gcc.jam around line 657 matching the reality? 3. Is naming in (1) compatible with using -Bstatic to request static libs? Thanks, Volodya

На Sat, 30 May 2009 19:46:12 +0400 Vladimir Prus <ghost@cs.msu.su> записано:
1. Currently, we use the same naming on mingw as on windows -- foo.dll and foo.lib for shared libs and import libs, and libfoo.lib for static library. Is this OK?
If you pass -lboost_foo to mingw ld then it will look for following libs: libboost_foo.dll.a boost_foo.dll.a libboost_foo.a <prefix>boost_foo.dll libboost_foo.dll boost_foo.dll where <prefix> can be set with --dll-search-prefix option to ld and is 'cyg' by default in case of cygwin. Consequently it will be able to find only the dynamic library (boost_foo.dll). So in order to link against boost on mingw everyone should remember to pass -llibboost_foo instead of -lboost_foo or rename the boost libs. I'd rather prefer if -lboost_foo worked out of the box on all platforms including mingw.

Sergey Popov wrote:
libboost_foo.dll.a boost_foo.dll.a libboost_foo.a <prefix>boost_foo.dll libboost_foo.dll boost_foo.dll It will also look for boost_foo.lib but not for libboost_foo.lib. So libboost_foo.lib static lib won't be found unless you use -llibboost_foo.
Ok, thanks. Is the search names for -Bstatic below correct? # windows (mingw,cygwin) -Bstatic -lxxx # libxxx.a # xxx.lib - Volodya
participants (3)
-
Sergey Popov
-
Vladimir Prus
-
Vladimir Prus