简体   繁体   中英

Visual Studio 2010 win32 compiled application does not work on 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?

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!

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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