[build] Library suffix on mingw/win32
I have used boost for some time on windows with msvc, but I am trying to install & use it with mingw-g++. I'm no gcc expert, but it seems that ld requires specific extensions for libraries, and bjam is not generating the right ones. In particular, under mingw, the flag -lboost_unit_test_framework Will match boost_unit_test_framework.lib (the import library for the dll) Or libboost_unit_test_framework.a But NOT libboost_unit_test_framework.lib Which is what bjam produces. Here is an approach that WONT work: Using -llibboost_unit_test_framework Or -llibboost_unit_test_framework.lib Fails because the leading 'lib' is automatically stripped out by ld. As a solution I just renamed all lib*.lib files to lib*.a, but something seems basically wrong with the situation. I don't know WHY bjam used a '.lib' suffix, since I built the libraries using gcc. The static libraries I generate from gcc should be linkable from gcc... I use mingw + msys to build boost as follows: 1) I installed MinGW Automated Installer, MingW GCC 4.3.0, and then MSYS via its installer. - this creates C:\MingW and C:\msys\1.0. The gcc-4.3.0 files are extraced into C:\mingw 2) I open the MSYS shell by running msys.bat 3) I fetch boost/trunk into my home directory using svn. 4) I run tools/jam/build_dist.sh to create bjam 5) I copy bjam.exe to /mingw/bin 6) from within the msys shell, I run bjam --toolset=gcc --layout=system --build-type=complete --prefix=/mingw When I am done, under /mingw/lib I have files with names like: boost_*.dll boost_*.lib libboost_*.lib In particular, the static libraries have a '.lib' suffix. I have googled and searched the boost site, and I can find issues related to mingw/etc but nobody else seems to have _this_ problem. Is there something I am just doing wrong here? BTW: --toolset=mingw failed to find the mingw toolset, but when I build with gcc is seems to know what to do. Thanks, --John Femiani
participants (1)
-
John Femiani