ubuntu下编译boost

折腾了一中午终于把boost的安装好了

1:下载boost 1.55版本。

2:解压

3:执行./bootstrap --toolset=gcc

4: 执行b2 --build-type=complete install   cxxflags="-std=c++11"  该选项可不要

5: 执行ldconfig更新动态链接库 或者配置LD_LIBRARY_PATH=.:/usr/local/lib:$LD_LIBRARY_PATH


使用boost多线程时候需要 -lboost_system -lboost_thread 


/usr/bin/ld: /tmp/ccxcUocD.o: undefined reference to symbol '_ZN5boost6system15system_categoryEv'
/usr/local/lib/libboost_system.so.1.55.0: error adding symbols: DSO missing from command line

这个问题时缺少-lboost_system造成的,




你可能感兴趣的:(ubuntu下编译boost)