How do you link boost in Code::Blocks? (in windows OS only)
Answer:
1. if you want link boost static lib : pls add this line into "Link libraries"
liblibboost_system-mgw44
yes, here need double lib prefix...since C::B will remove the first "lib" :
mingw32-g++.exe -LE:\cpp_ex_libs\boost\boost_1_42_0\lib -o bin\Debug\asio_client.exe obj\Debug\c_main.o -llibboost_system-mgw44
-lwsock32 -lws2_32
)
or , you have to add "$(#boost.lib)\libboost_system-mgw44.lib" into "Other linker options".
or , rename all libboost_xxxx.lib to libboost_xxxx.a
2. and if you want link boost dynamic lib , pls :
libboost_system-mgw44
here, c::b remove first "lib" also:
mingw32-g++.exe -LE:\cpp_ex_libs\boost\boost_1_42_0\lib -o bin\Debug\asio_client.exe obj\Debug\c_main.o -lboost_system-mgw44
-lwsock32 -lws2_32
or : boost_system-mgw44
--------------------------------------------
ref :
http://forums.codeblocks.org/index.php/topic,9196.msg65770.html#msg65770http://forums.codeblocks.org/index.php/topic,8231.0.html