fetch
fetch

Reputation: 108

Building c++ project for Win XP in MSVC 2012

I have a console application that I need to use on Windows XP. Also i'm using MSVC 2012 as an IDE. Problem, that when i run it on Win XP (SP3) i receive error message that this application is not a valid win32 application.

UPD:

After talking care about suggestions in the comments to this question, i've updated my question.

What does use my application:

What i've already tryed:

Dependency walker shows 3 messages:

As far as i see nothing of listed in dependency walker should affect my app, but it still fail to load with error "not a valid win32 application".

Does anyone have ideas why>

Upvotes: 0

Views: 670

Answers (2)

fetch
fetch

Reputation: 108

The v110_xp toolset automatically specifies the SUBSYSTEM's MRV ("5.1" (WindowsXP)) but not the SUBSYSTEM

That was the problem. I've set SUBSYSTEM to "/SUBSYSTEM:CONSOLE" in project settings & problem with target Win XP dissapeared. Thanks everyone for comments.

Upvotes: 1

light_keeper
light_keeper

Reputation: 647

As I know, MSVC 2012 toolset do not support windows XP. But you can use MSVC 2010 toolset in IDE 2012. Or use toolset v110_xp forom Visual Studio 2012 Update 1(I didn't try it).

This link may help

http://blogs.msdn.com/b/vcblog/archive/2012/10/08/windows-xp-targeting-with-c-in-visual-studio-2012.aspx?Redirected=true

Upvotes: 0

Related Questions