[Boost-bugs] [Boost C++ Libraries] #2181: Boost build issue on Windows/MinGW

Subject: [Boost-bugs] [Boost C++ Libraries] #2181: Boost build issue on Windows/MinGW
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2008-08-11 04:47:59


#2181: Boost build issue on Windows/MinGW
---------------------------------+------------------------------------------
 Reporter: tristen_e_at_[hidden] | Type: Feature Requests
   Status: new | Milestone: Boost 1.36.0
Component: None | Version: Boost 1.35.0
 Severity: Problem | Keywords: win32 gcc static link mingw
---------------------------------+------------------------------------------
 bjam link=static --toolset=gcc

 If I build boost static libraries on windows with the intention of using
 them with the GCC toolset, the resulting libraries are created with a .lib
 extension:

 libboost_date_time-mgw34-mt-1_35.lib
 libboost_filesystem-mgw34-mt-1_35.lib
 libboost_graph-mgw34-mt-1_35.lib
 libboost_iostreams-mgw34-mt-1_35.lib
 libboost_prg_exec_monitor-mgw34-mt-1_35.lib
 libboost_program_options-mgw34-mt-1_35.lib
 libboost_regex-mgw34-mt-1_35.lib
 libboost_serialization-mgw34-mt-1_35.lib
 libboost_signals-mgw34-mt-1_35.lib
 libboost_system-mgw34-mt-1_35.lib
 libboost_test_exec_monitor-mgw34-mt-1_35.lib
 libboost_thread-mgw34-mt-1_35.lib
 libboost_unit_test_framework-mgw34-mt-1_35.lib
 libboost_wave-mgw34-mt-1_35.lib

 Subsequently, after compiling my code using these libraries, I get a run-
 time error saying the relevant DLL wasn't found.

 However, if I rename all of the boost libraries from .lib files to .a
 files and compile again, the run-time errors go away and the program runs
 fine. The executable size increases approximately by the size of the
 static library too.

 I feel the solution to this problem is to have BJAM generate the set of
 static libraries with an extension of .a instead of .lib under windows if
 the GCC toolset was specified.

 ie:

 bjam link=static --toolset=gcc

 should result in the following files on Windows:

 libboost_date_time-mgw34-mt-1_35.a
 libboost_filesystem-mgw34-mt-1_35.a
 libboost_graph-mgw34-mt-1_35.a
 libboost_iostreams-mgw34-mt-1_35.a
 libboost_prg_exec_monitor-mgw34-mt-1_35.a
 libboost_program_options-mgw34-mt-1_35.a
 libboost_regex-mgw34-mt-1_35.a
 libboost_serialization-mgw34-mt-1_35.a
 libboost_signals-mgw34-mt-1_35.a
 libboost_system-mgw34-mt-1_35.a
 libboost_test_exec_monitor-mgw34-mt-1_35.a
 libboost_thread-mgw34-mt-1_35.a
 libboost_unit_test_framework-mgw34-mt-1_35.a
 libboost_wave-mgw34-mt-1_35.a

 Regards
 Tristen

-- 
Ticket URL: <http://svn.boost.org/trac/boost/ticket/2181>
Boost C++ Libraries <http://www.boost.org/>
Boost provides free peer-reviewed portable C++ source libraries.

This archive was generated by hypermail 2.1.7 : 2017-02-16 18:49:58 UTC