开发者

On which Windows versions and configurations does my C++ app run?

I've built a C++ application using MSVC 2010, def开发者_如何学Cault compile settings (note: Using "Multithreaded" instead of "Multithreaded DLL" to avoid the Microsoft C++ runtime being needed).

I used only the STL and a few, old functions from the Win32 API (Windows.h).

  • Where will my app run? (98-7?)
  • Can the be any differences on how my app works on different PCs? As said: It's only a simple console app.

I'd be glad if you could add some additional information if you have it!


The Simplest answer is: Your app will run on Windows versions 5.0 and later - depending on what other APIs YOU use.

the hard limit of 5.0 is introduced in Visual C++ 2008 that stamps a 5 into the minimum OS version field in all the PE headers of all the executable files it produces.

As Windows NT is the only desktop OS with version's 5 and higher, this means that Windows 95, 98, ME cannot run programs made with VS 2008 and VS 2010. Windows 2000 is actually Windows NT 5.0, so it can be targetted. XP is 5.1, Vista 6.0, and in a twist of idiocy, Windows 7 is actually version 6.1 of Windows NT.


Take a look at "Using the Windows Headers" at MSDN. It describes how to configure the windows header files to support various mixtures of OS's.


I think you have to think about it the other way, what versions of Windows do you need to support, and then you can check if the APIs you need are supported or if you have to find workarounds. After seeing Chris' comment about Win9x no longer being supported I took a look and discovered that the 2010 redist package only supports WinXP and upwards, so you might not be able to compile for Win 2000 either now?

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜