Build Boost 1.52使用Visual Studio 2012库来定位Windows XP [英] Build Boost 1.52 Libraries using Visual Studio 2012 to target Windows XP

查看:145
本文介绍了Build Boost 1.52使用Visual Studio 2012库来定位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 PATH CL Boost.Build使用此批处理文件,因此您不需要进行任何其他更改。



例如这里是新的:x86 部分

 :x86 
如果不存在%〜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
pre>

四个设置是添加。类似的事情可以做的: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 the LIB, INCLUDE, PATH and CL 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屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆