简体   繁体   English

如何在使用Visual C ++ 2010进行编译时定位Windows XP sp3?

[英]How to target Windows XP sp3 when compiling with Visual C++ 2010?

I am trying to compile a C++ program using Visual Studio 2010 Pro on a Windows 7 computer to target Windows XP sp3 32 bits. 我试图在Windows 7计算机上使用Visual Studio 2010 Pro编译C ++程序,以将Windows XP sp3 32位作为目标。

I've played around with the compiler and linker settings, but I'm unable to produce an executable that can run on my Windows XP computer. 我玩过编译器和链接器设置,但是我无法生成可在我的Windows XP计算机上运行的可执行文件。 I always get the error "Could not find entry point for function GetTickCount64 in kernel32.dll" and the program doesn't run. 我总是收到错误“无法在kernel32.dll中找到函数GetTickCount64的入口点”,程序无法运行。 I know Windows XP does not support GetTickCount64() and I'm not using it in my code anyways. 我知道Windows XP不支持GetTickCount64(),而且我还没有在我的代码中使用它。

I don't have other versions of Visual Studio installed, and I already installed Visual C++ 2010 Redistributable Package on the windows XP machine. 我没有安装其他版本的Visual Studio,并且我已经在Windows XP计算机上安装了Visual C ++ 2010 Redistributable Package。

Any idea on how to accomplish this? 有关如何实现这一点的任何想法?

Thanks before hand. 先谢谢你。

VC2010 targets Windows 7 by default. VC2010默认以Windows 7为目标。 To change target to XP, check Using the Windows Headers 要将目标更改为XP,请选中“ 使用Windows标头”

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM