Maximizing compatibility of VC++ 2k5 projects  
Author Message
NumberFour!





PostPosted: Visual C++ General, Maximizing compatibility of VC++ 2k5 projects Top

Hello ALL,

I've got following question: how can I setup up the C++ compiler in VS2005 to compile applications with compatibility across win NT family... all applications I build can run only on XP SP2, failing to run under Win 2k and XP without SP2 (throws errors like "Invalid Win32 application, please reinstall"). I actually need to run my applications on Win NT family or at least on Win 2k. I use clean C++ and Win32 functions (all compatible with lower Win versions).

Thanks in advance.



Visual C++11  
 
 
CJPO





PostPosted: Visual C++ General, Maximizing compatibility of VC++ 2k5 projects Top

Without the full error message I can't be sure of what your problem is, but I can guess and make some suggestions.

First off your problem might just be that you have not put the proper VS2005 DLLs on the target machine. VS2005 is going to use need the newest versions and if you just put them in you application directory that usually solves startup problems. If this is the problem it will state that it can't find a DLL.

The next thing is just what kind of project you create is going to determine what kind runtime support you need. For instance any project in the CLR section is going to use .Net, and for VS2005 that means .Net 2.0 and that means .Net 2.0 would have to be installed on the target machine. For the other project types it is usually just the runtime DLLs that need to be included and you can find them at:

"C:\Program Files\Microsoft Visual Studio 8\VC\redist"

Also for non-.Net/CLR projects you can change WINVER in your stdafx.h file, but I have actually found that as long as I didn't use anything that isn't supported on the target OS, and get the proper DLLs in the application directory, I haven't had to change WINVER.

Another suggestion is start small. Like just compile up the Win32 HelloWorld example and put it on the target machine, and see if that starts up, it certainly should.



 
 
CJPO





PostPosted: Visual C++ General, Maximizing compatibility of VC++ 2k5 projects Top

Also see the FAQ that has a message about deploying C++ DLLS.