Build Boost 1.52使用Visual Studio 2012库来定位Windows XP [英] Build Boost 1.52 Libraries using Visual Studio 2012 to target Windows XP
问题描述
Visual Studio 2012 Update 1使用工具集vc110_xp启用对Windows XP目标的支持。
如何配置Boost 1.52使用vc110_xp工具集?
我发现最简单的方法是编辑 \Program Files(x86)\ Microsoft Visual Studio 11.0 \VC\vcvarsall.bat
添加行以更改 LIB
, INCLUDE $ c加载默认值后,$ c>,
PATH
和 CL
Boost.Build使用此批处理文件,因此您不需要进行任何其他更改。
例如这里是新的:x86
部分
:x86
pre>
如果不存在%〜dp0bin\vcvars32.batgoto缺少
调用%〜dp0bin \vcvars32.bat
set INCLUDE =%ProgramFiles(x86)%\Microsoft SDKs\Windows \7.1A\Include;%INCLUDE %
set PATH =%ProgramFiles(x86)%\Microsoft SDKs\Windows\7.1A\Bin;%PATH%
set LIB =%ProgramFiles(x86)%\Microsoft SDKs\\ \\ Windows \7.1A \Lib;%LIB%
set CL = / D_USING_V110_SDK71 _;%CL%
goto:SetVisualStudioVersion
四个
设置
是添加。类似的事情可以做的:amd64
部分,虽然我犹豫发布它,因为我只测试XP 32bit自己,我已经乐意定位Vista + for 64bit版本。"Visual Studio 2012 Update 1" enabled support for a Windows XP target using toolset "vc110_xp".
How do I configure Boost 1.52 to build libraries using the vc110_xp toolset ?
解决方案I found the easiest way was to edit
\Program Files (x86)\Microsoft Visual Studio 11.0\VC\vcvarsall.bat
add lines to change theLIB
,INCLUDE
,PATH
andCL
variables after the defaults were loaded. Boost.Build uses this batch file so you don't need to make any other changes.For example here is the new
:x86
section:x86 if not exist "%~dp0bin\vcvars32.bat" goto missing call "%~dp0bin\vcvars32.bat" set INCLUDE=%ProgramFiles(x86)%\Microsoft SDKs\Windows\7.1A\Include;%INCLUDE% set PATH=%ProgramFiles(x86)%\Microsoft SDKs\Windows\7.1A\Bin;%PATH% set LIB=%ProgramFiles(x86)%\Microsoft SDKs\Windows\7.1A\Lib;%LIB% set CL=/D_USING_V110_SDK71_;%CL% goto :SetVisualStudioVersion
Wth the four
set
's being the additions. A similar thing can be done for the:amd64
section, though I'm hesitant to post it as I've only tested XP 32bit myself, I've been happy to target Vista+ for 64bit builds.这篇关于Build Boost 1.52使用Visual Studio 2012库来定位Windows XP的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!