找到你要的答案

Q:Visual Studio 2010 win32 compiled application does not work on windows xp

Q:Visual Studio 2010 win32编译应用程序不工作在Windows XP

I'm working on a project that should run on all windows platforms. It is written in c++, using only the Windows API. When I compile it in Visual Studio 6 on Windows XP, I can run it on Windows XP. When I run it in Visual Studio 2010 and run it on Windows XP it did not work. I did install vcredist2010_x86, vcredist2010sp1_x86 and .NET versions 3.5 and 4.0 on Windows XP SP3. But it still doesn't work. I added the following preprocessor symbols to my project:

#define _WIN32_WINNT 0x0501
#define WINVER 0x0501
#define NTDDI_VERSION 0x0501

but it still doesn't work. My VS 2010 platform toolset is v100.

Question: What do I need to do to compile an application using Visual Studio 2010, that can be executed on Windows XP?

我正在研究一个在所有Windows平台上运行的项目。这是用C++,只使用Windows API。当我把它编译Visual Studio 6在Windows XP中,我可以在Windows XP上运行它。当我运行它在Visual Studio 2010和Windows XP没有运行工作。我没有安装vcredist2010_x86,vcredist2010sp1_x86和.NET版本的Windows XP SP3的3.5和4。但它仍然不工作。我增加了以下预处理器符号我的项目:

#define _WIN32_WINNT 0x0501
#define WINVER 0x0501
#define NTDDI_VERSION 0x0501

但它仍然不工作。我对2010平台工具V100。

问:如何使用Visual Studio 2010编译应用程序做什么的我,可以在Windows XP上执行?

answer1: 回答1:

I'm using VS2010_sp1 on window_7_sp1_x64 and with 'release' mode. I added #define previous to my include section. And I've tested NTDDI_VERSION to 0x05010300 but problem is still alived! The error, showed by win_xp is: "program.exe has encountered a ploblem and needs to close." At all, I think, program needs dll or something to install on windows xp to run correctly!

I'm using VS2010_sp1 on window_7_sp1_x64 and with 'release' mode. I added #define previous to my include section. And I've tested NTDDI_VERSION to 0x05010300 but problem is still alived! The error, showed by win_xp is: "program.exe has encountered a ploblem and needs to close." At all, I think, program needs dll or something to install on windows xp to run correctly!

c++  windows  visual-studio-2010  winapi  windows-xp