其他分享
首页 > 其他分享> > c – 构建Boost 1.49.0时出现致命错误C1027

c – 构建Boost 1.49.0时出现致命错误C1027

作者:互联网

我正在尝试使用MSVC2010构建Boost 1.49.0,但它失败并出现以下错误:

file bin.v2\libs\math\build\msvc-10.0\release\link-static\runtime-link-static\threading-multi\assoc_laguerre.obj.rsp
"libs\math\build\..\src\tr1\assoc_laguerre.cpp"
 -Fo"bin.v2\libs\math\build\msvc-10.0\release\link-static\runtime-link-static\threading-multi\assoc_laguerre.obj"
  -Yu"pch.hpp"
 -Fp"bin.v2\libs\math\build\msvc-10.0\release\link-static\runtime-link-static\threading-multi\pch.pch"
 -TP
 /O2
 /Ob2
 /W3
 /GR
 /MT
 /Zc:forScope
 /Zc:wchar_t
 /wd4675
 /EHs
 -c

-DBOOST_ALL_NO_LIB=1

-DBOOST_BUILD_PCH_ENABLED

-DNDEBUG

"-I."

"-Ilibs\math\src\tr1"

compile-c-c++ bin.v2\libs\math\build\msvc-10.0\release\link-static\runtime-link-static\threading-multi\assoc_laguerre.obj

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

assoc_laguerre.cpp
c1xx : fatal error C1027: Inconsistent values for /Ym between creation and use of precompiled header

这是该错误的第一个实例,我的日志文件在构建中止之前有995个相同错误的实例.

project-config.jam的内容是:

import option ; 

using msvc ; 

option.set keep-going : false ; 

using python : 3.2 : C:\\Tools\\Python\\3.2.2 ;

我使用的构建命令是:

b2 --toolset=msvc-10.0 --build-type=complete stage -q -d+2 -sICU_PATH="C:\Tools\ICU\4.8.1.1"

知道是什么导致了这个吗?

解决方法:

Here是错误的解释,here是在构建其他东西时遇到此问题的人及其解决方案.

他将/ Zm参数从/ Zm1000修改为/ Zm500(你有/ Zm800).我不知道将它改为相同的值会对你有所帮助,但是你可以尝试使用它(这个编译器的标志解释可以在here找到).

您可以使用cxxflags命令行参数来修改编译器标志(取自here).

标签:c,build,boost,bjam
来源: https://codeday.me/bug/20190723/1513442.html