当在释放模式连接我的项目,我收到以下警告:
myProject-libs/release/libboost_regex-mt-s-1.50.0.a(cpp_regex_traits.o): duplicate section `.data$_ZZN5boost16cpp_regex_traitsIcE21get_catalog_name_instEvE6s_name[boost::cpp_regex_traits<char>::get_catalog_name_inst()::s_name]' has different size
我怀疑原因可能是比我用我的项目Boost库与不同的选项编译,但我不知道如何找到差异(升压没有输出在生成过程中这些选项)。
为了编译升压为在Ubuntu 12.04的Win32我用这个方法:
tar jxf boost_1_50_0.tar.bz2
cd boost_1_50_0
./bootstrap.sh
echo "using gcc : 4.6 : i686-w64-mingw32-g++ : <rc>i686-w64-mingw32-windres <archiver>i686-w64-mingw32-ar ;" > user-config.jam
./bjam toolset=gcc target-os=windows --address-model=32 variant=release threading=multi threadapi=win32 link=static runtime-link=static --prefix=/opt/boost_1_50_0-release-static-windows-32 --user-config=user-config.jam -j 10 --without-mpi --without-python -sNO_BZIP2=1 -sNO_ZLIB=1 --layout=tagged install
为了编译在我的项目文件,我使用类似
i686-w64-mingw32-g++ -march=corei7 -mfpmath=sse -m32 -Wall -fmessage-length=0 -I"/opt/boost_1_50_0-release-static-windows-32/include" -std=c++0x -O3 -g0 -DNDEBUG -I"myProject/src/cpp" -c -o myProject/build/release/src/cpp/myproject.o myproject/src/cpp/myproject.cpp
我有测试表明,正则表达式,运行良好,但我仍想解决的警告。
编辑
我发现,升压编译器的附加选项可以使用的bjam的CXXFLAGS =参数添加。
例如:的bjam CXXFLAGS = ' - 子卡' ....
也许,确保为我做的这个项目可以解决问题(特别是关于作为链接的问题提出优化参数)来传递相同的参数。