Click here to Skip to main content
15,888,190 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
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.
Posted
Updated 28-Sep-17 17:02pm
v2

1 solution

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.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900