简体   繁体   English

在MSVC 2010上使用bjam构建Boost 1.50时出错

[英]Error building Boost 1.50 with bjam on MSVC 2010

Building Boost 1.50 with bjam on MSVC 2010 在MSVC 2010上使用bjam构建Boost 1.50

I'm trying to build the latest Boost (1.50) using MSVC 2010. I have MSVC 2003 and 2008 installed on the same machine (Windows Vista), and have successfully been able to build Boost 1.50 using both toolsets. 我正在尝试使用MSVC 2010构建最新的Boost(1.50)。我已经在同一台计算机(Windows Vista)上安装了MSVC 2003和2008,并且已经能够使用这两个工具集成功构建Boost 1.50。 However I'm having trouble with msvc 2010. 但是我在使用msvc 2010时遇到了麻烦。

The following is the bjam command I use after having called bootstap.bat: 以下是我在调用bootsstap.bat之后使用的bjam命令:

bjam --without-mpi --without-python --toolset=msvc-7.1 --build-type=complete -d+2
bjam --without-mpi --without-python --toolset=msvc-9.0 --build-type=complete -d+2
bjam --without-mpi --without-python --toolset=msvc-10.0 --build-type=complete -d+2

When building MSVC 2010, I get the following error messages: 生成MSVC 2010时,出现以下错误消息:

file bin.v2\libs\exception\build\msvc-10.0\release\link-static\runtime-link-static\clone_current_exception_non_intrusive.obj.rsp
"libs\exception\src\clone_current_exception_non_intrusive.cpp" -Fo"bin.v2\libs\exception\build\msvc-10.0\release\link-static\runtime-link-static\clone_current_exception_non_intrusi
ve.obj"    -TP /O2 /Ob2 /W3 /GR /Zc:forScope /Zc:wchar_t /MT /wd4675 /EHs -c
-DBOOST_ALL_NO_LIB=1
-DNDEBUG
"-I."
compile-c-c++ bin.v2\libs\exception\build\msvc-10.0\release\link-static\runtime-link-static\clone_current_exception_non_intrusive.obj

    call "C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\vcvarsall.bat" x86 >nul
cl /Zm800 -nologo @"bin.v2\libs\exception\build\msvc-10.0\release\link-static\runtime-link-static\clone_current_exception_non_intrusive.obj.rsp"

Command line error D2016 : '/Ze' and '/Za' command-line options are incompatible
...skipped <pbin.v2\libs\exception\build\msvc-10.0\release\link-static\runtime-link-static>libboost_exception-vc100-s-1_50.lib for lack of <pbin.v2\libs\exception\build\msvc-10.0\r
elease\link-static\runtime-link-static>clone_current_exception_non_intrusive.obj...
...skipped <pstage\lib>libboost_exception-vc100-s-1_50.lib for lack of <pbin.v2\libs\exception\build\msvc-10.0\release\link-static\runtime-link-static>libboost_exception-vc100-s-1_
50.lib...

file bin.v2\libs\filesystem\build\msvc-10.0\release\link-static\runtime-link-static\codecvt_error_category.obj.rsp
"libs\filesystem\src\codecvt_error_category.cpp" -Fo"bin.v2\libs\filesystem\build\msvc-10.0\release\link-static\runtime-link-static\codecvt_error_category.obj"    -TP /O2 /Ob2 /W3
/GR /Zc:forScope /Zc:wchar_t /MT /wd4675 /EHs -c
-DBOOST_ALL_NO_LIB=1
-DBOOST_FILESYSTEM_STATIC_LINK=1
-DBOOST_SYSTEM_STATIC_LINK=1
-DNDEBUG
"-I."
compile-c-c++ bin.v2\libs\filesystem\build\msvc-10.0\release\link-static\runtime-link-static\codecvt_error_category.obj

    call "C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\vcvarsall.bat" x86 >nul
cl /Zm800 -nologo @"bin.v2\libs\filesystem\build\msvc-10.0\release\link-static\runtime-link-static\codecvt_error_category.obj.rsp"

Command line error D2016 : '/Ze' and '/Za' command-line options are incompatible

file bin.v2\libs\filesystem\build\msvc-10.0\release\link-static\runtime-link-static\operations.obj.rsp
"libs\filesystem\src\operations.cpp" -Fo"bin.v2\libs\filesystem\build\msvc-10.0\release\link-static\runtime-link-static\operations.obj"    -TP /O2 /Ob2 /W3 /GR /Zc:forScope /Zc:wch
ar_t /MT /wd4675 /EHs -c
-DBOOST_ALL_NO_LIB=1
-DBOOST_FILESYSTEM_STATIC_LINK=1
-DBOOST_SYSTEM_STATIC_LINK=1
-DNDEBUG
"-I."
compile-c-c++ bin.v2\libs\filesystem\build\msvc-10.0\release\link-static\runtime-link-static\operations.obj

    call "C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\vcvarsall.bat" x86 >nul
cl /Zm800 -nologo @"bin.v2\libs\filesystem\build\msvc-10.0\release\link-static\runtime-link-static\operations.obj.rsp"

Command line error D2016 : '/Ze' and '/Za' command-line options are incompatible

file bin.v2\libs\filesystem\build\msvc-10.0\release\link-static\runtime-link-static\path.obj.rsp
"libs\filesystem\src\path.cpp" -Fo"bin.v2\libs\filesystem\build\msvc-10.0\release\link-static\runtime-link-static\path.obj"    -TP /O2 /Ob2 /W3 /GR /Zc:forScope /Zc:wchar_t /MT /wd
4675 /EHs -c
-DBOOST_ALL_NO_LIB=1
-DBOOST_FILESYSTEM_STATIC_LINK=1
-DBOOST_SYSTEM_STATIC_LINK=1
-DNDEBUG
"-I."
compile-c-c++ bin.v2\libs\filesystem\build\msvc-10.0\release\link-static\runtime-link-static\path.obj

    call "C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\vcvarsall.bat" x86 >nul
cl /Zm800 -nologo @"bin.v2\libs\filesystem\build\msvc-10.0\release\link-static\runtime-link-static\path.obj.rsp"

Command line error D2016 : '/Ze' and '/Za' command-line options are incompatible

I have very little experience with bjam other than executing the command lines described above. 除了执行上述命令行外,我对bjam的经验很少。 I believe everything is setup correctly, all the compilers are on the PATH environment variable. 我相信所有设置都正确,所有编译器都位于PATH环境变量上。 eg: 例如:

C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\bin
C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\bin

Furthermore I can't see where in the bjam configs for msvc that the '/Ze' and '/Za' are defined. 此外,我看不到在msvc的bjam配置中在何处定义了“ / Ze”和“ / Za”。

Is there something else I'm missing? 还有其他我想念的东西吗?

Instead of adding the compiler to the path, have you tried launching bjam from Visual Studio Command Prompt (found on your Start Menu)? 您是否尝试过从Visual Studio命令提示符(在“开始”菜单上找到)启动bjam,而不是将编译器添加到路径中?

I never put anything on PATH - I just run that, go to boost folder, bootstrap and build. 我从来没有在PATH上放任何东西-我只是运行它,转到boost文件夹,启动并构建。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM