DelphiFAQ Home Search:
General :: Programming :: C++


Articles:

This list is sorted by recent document popularity (not total page views).
New documents will first appear at the bottom.

Featured Article

Error message "WINVER not defined. Defaulting to 0x0501 (Windows XP and Windows .NET Server)"

Question:

I am porting an application from apple's objective-C to Visual C++ .NET. I keep getting the following compilation warning (? error?) message:

Error message "WINVER not defined. Defaulting to 0x0501 (Windows XP and Windows .NET Server)"

Should I be concerned?

Answer:

If you don't do this already, you should be including stdafx.h in all your modules as the first include statement.
Then add the following into your project's stdafx.h:

#define WINVER 0x0400

Note: Define it for the lowest operating system you need your app to run on, not the OS you build on.

It defaulted to 0x0501 because you build on XP but defining it as 0x0400 will allow it to run on Windows 2000 as well.

You may also want to read Microsoft's comments on modifying WINVER here:
http://msdn.microsoft.com/(..)/vcgrfmodifyingwinver.asp


Generated 16:01:21 on Oct 19, 2017