[Coco] VCC 2.0.1b Released (New Thread)

James Ross jrosslist at outlook.com
Sun Oct 4 00:12:46 EDT 2015


> From: wmikrut72 at gmail.com
> Subject: Re: [Coco] VCC 2.0.1b Released (New Thread)
>
> As Bill said... I see this a lot.

No question it's probably a common scenario.

> The current version of Visual Studio produces exe files that are not
> compatible with earlier versions of windows.

True to certain extent but is does not have to be. All recent versions of VC++ can create executables for Windows XP (and Windows Server 2003). More than likely the case is that the developers did not want to be troubled w/ researching how to do it.   

Ok, so I got curious and I did a little research on this. So I did an experiment. I created a default Win32 app using VS2013 (have not installed 2015 yet, but I am sure for this purposes it's identical to 2015) and sure enough, I got the same error in XP (xxx.exe is not a valid Win32 application).

Then I applied these two settings in the project Property Settings: 

Configuration Properties | C/C++ | All Options | Additional Options 
Add the option: /D_ATL_XP_TARGETING

then 

Configuration Properties | Linker | System | Minimum Required Version
Set it to 5.01

Now my test Win32 app would attempt to run but it complained that MSVCR120.dll was missing… I needed to do a static link the standard libraries. So a little more research...  

Configuration Properties | C/C++ | Code Generation | Runtime Library 
Set it to Multi-threaded (/MT)   ---- for the release settings chose the debug one for debug. 

Now the test app loaded and run fine under Windows XP.

So, Bill there are the settings for whoever is compiling VCC to make it work w/ XP.   (if you want that... I know I would!)

I found this info on these two pages

How to target XP with VC2012 or VC2013 and continue to use the Windows 8.x SDK
https://tedwvc.wordpress.com/2014/01/01/how-to-target-xp-with-vc2012-or-vc2013-and-continue-to-use-the-windows-8-x-sdk/

Microsoft Visual Studio ~ C/C++ Runtime Library ~ Static/dynamic linking
http://stackoverflow.com/questions/14749662/microsoft-visual-studio-c-c-runtime-library-static-dynamic-linking

James

... snip ... 		 	   		  


More information about the Coco mailing list