如何使用vs2013命令提示符构建libcurl并将目标指向windowsxp? [英] How to build libcurl with vs2013 command prompt and target to windowsxp?

查看:93
本文介绍了如何使用vs2013命令提示符构建libcurl并将目标指向windowsxp?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我知道在curl的src中有一个vs项目目录。我可以使用它在vc12_xp中构建libcurl并且它工作正常。但是我仍然需要在vc12_xp中构建openssl并且它没有vs项目文件。 />


我尝试了什么:



我试图设置vs环境此官方页面后面的变量: blogs.msdn.microsoft.com/vcblog/2012/10/08/windows-xp-targeting-with-c-in-visual-studio-2012/ 。但它不起作用。它发生错误比如__useHeader marco redefinition或SecApplicationProtocolNegotiationEx unclared identifier等。

解决方案

似乎我找到了解决方案。我打印出这些变量,我找到了Microsoft官方解决方案不适合我。在我的电脑上,匹配目录的名称是v7.1A,而不是7.1A。在我完成设置vsvars32.bat后,我发现没有名为CL的变量,所以我只设置CL等于/D_US​​ING_V110_SDK71_。以下是我的解决方案。

Step1:

set vcvars32.bat



第二步:

设置INCLUDE =%ProgramFiles(x86)%\ Myicoft SDKs \ Windows \ v7.1A\Include;%INCLUDE%



设置PATH =%ProgramFiles(x86)%\ Macrosoft SDKs \ Windows \\\\\\\\\\\\\\\\\\\ ;%PATH%



设置LIB =%ProgramFiles(x86)%\ Macrooft SDKs \ Windows \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\ />


设置CL = / D_USING_V110_SDK71_



设置LINK = / SUBSYSTEM:CONSOLE,5.01



以下是一些参考资料。

如何使用VC2012或VC2013定位XP并继续使用Windows 8.x SDK泰德的博客 [ ^ ]



Windows XP在Visual Studio中使用C ++进行定位2012 | Visual C ++团队博客 [ ^ ]



对不起,我的英语很差,希望这个解决方案有用。

I know there is a vs project directory in curl's src.I can use that to build libcurl in vc12_xp and it works fine.But I still need build openssl in vc12_xp and it doesn't have a vs project file.

What I have tried:

I've tried to set vs environment variables following this official page:blogs.msdn.microsoft.com/vcblog/2012/10/08/windows-xp-targeting-with-c-in-visual-studio-2012/.But it doesn't work.It occurs erros like "__useHeader marco redefinition" or "SecApplicationProtocolNegotiationEx undeclared identifier" etc.

解决方案

Seems I have found a solution.I print these variables out and I found the Microsoft Official solution is not suitable for me.On my computer the matched directory's name is v7.1A,not 7.1A. And after I finished set vsvars32.bat I found there is no variable named "CL",so I just set CL equal to /D_USING_V110_SDK71_.Following is my solution.
Step1:
set vcvars32.bat

Step2:
set INCLUDE=%ProgramFiles(x86)%\Microsoft SDKs\Windows\v7.1A\Include;%INCLUDE%

set PATH=%ProgramFiles(x86)%\Microsoft SDKs\Windows\v7.1A\Bin;%PATH%

set LIB=%ProgramFiles(x86)%\Microsoft SDKs\Windows\v7.1A\Lib;%LIB%

set CL=/D_USING_V110_SDK71_

set LINK=/SUBSYSTEM:CONSOLE,5.01

Here are some references.
How to target XP with VC2012 or VC2013 and continue to use the Windows 8.x SDK | Ted's Blog[^]

Windows XP Targeting with C++ in Visual Studio 2012 | Visual C++ Team Blog[^]

Sorry for my poor english,hope this solution is helpful.


这篇关于如何使用vs2013命令提示符构建libcurl并将目标指向windowsxp?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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