SCons和节约型建筑问题 我需要使用节约来创建C++应用程序,并使用SCONS构建它。为了做到这一点,我下载并安装了所有需要的lib(并确保所有lib都适用于x64windows)——boost、openssl和libevent

SCons和节约型建筑问题 我需要使用节约来创建C++应用程序,并使用SCONS构建它。为了做到这一点,我下载并安装了所有需要的lib(并确保所有lib都适用于x64windows)——boost、openssl和libevent,c++,boost,thrift,scons,C++,Boost,Thrift,Scons,我用命令构建了boost: b2 -j4 toolset=msvc-14.1 address-model=64 architecture=x86 link=static threading=multi runtime-link=shared --build-type=complete stage --stagedir=stage/x64 接下来,我在VS2017(x64/Release)中构建了节俭libs 但是,当我尝试用SCON构建项目时,我遇到了错误。 当我尝试这样使用SConstruc

我用命令构建了boost:

b2 -j4 toolset=msvc-14.1 address-model=64 architecture=x86 link=static threading=multi runtime-link=shared --build-type=complete stage --stagedir=stage/x64
接下来,我在VS2017(x64/Release)中构建了节俭libs

但是,当我尝试用SCON构建项目时,我遇到了错误。 当我尝试这样使用SConstruct文件时(从VS2017的开发者命令提示符运行):

我得到:

scons: Reading SConscript files ...
scons: done reading SConscript files.
scons: Building targets ...
cl /Fogen-cpp\MARS.obj /c gen-cpp\MARS.cpp /TP /nologo /EHsc /I. 
/IC:\Users\Antek\libs\thrift-0.10.0\thrift-0.10.0\lib\cpp\src 
/IC:\Users\Antek\libs\boost_1_64_0\boost
'cl' is not recognized as an internal or external command,
operable program or batch file.
scons: *** [gen-cpp\MARS.obj] Error 1
scons: building terminated because of errors.
将以下行添加到我的SConstruct时:
ENV=os.environ

我得到一个错误:

Libthrift.lib (TOutput.obj): MSIL .netmodule module found or module compiled 
with / GL; Consolidation will start again with the / LTCG option; Add the / 
LTCG option to the consolidation command line to improve the performance of 
the consolidator
Fatal error C1905: Frontend and backend are not compatible (must refer to 
the same processor)
LINK: fatal error LNK1257: code generation failed
Scons: *** [CoreWars.exe] Error 1257
Scons: building terminated because of errors

我已经在这上面花了太多时间了,所有的想法都将受到高度赞赏。谢谢。

VS2017尚不受SCON支持。在接下来的几周内,它很可能会出现在3.0版本中(至少是beta版)。如果你愿意尝试一下,有一个pull请求是有效的。我们很可能会转而使用vswhere工具,因为它应该更容易实现。
Libthrift.lib (TOutput.obj): MSIL .netmodule module found or module compiled 
with / GL; Consolidation will start again with the / LTCG option; Add the / 
LTCG option to the consolidation command line to improve the performance of 
the consolidator
Fatal error C1905: Frontend and backend are not compatible (must refer to 
the same processor)
LINK: fatal error LNK1257: code generation failed
Scons: *** [CoreWars.exe] Error 1257
Scons: building terminated because of errors