DelphiFAQ Home Search:

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


comments3 comments. Current rating: 4 stars (1 votes). Leave comments and/ or rate it.


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?


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:

Content-type: text/html


2005-11-09, 09:13:05
anonymous from United States  
2006-09-18, 06:35:11 from India  
0x0400 is for Windows NT 4.0. For Windows 2000 use 0x0500
2007-03-13, 09:47:40
anonymous from United Kingdom  
'It seems that you are from Hesketh Bank in Sefton, GB'


But thanks for the solution to the problem - works a treat ;-)



NEW: Optional: Register   Login
Email address (not necessary):

Rate as
Hide my email when showing my comment.
Please notify me once a day about new comments on this topic.
Please provide a valid email address if you select this option, or post under a registered account.

Show city and country
Show country only
Hide my location
You can mark text as 'quoted' by putting [quote] .. [/quote] around it.
Please type in the code:

Please do not post inappropriate pictures. Inappropriate pictures include pictures of minors and nudity.
The owner of this web site reserves the right to delete such material.

photo Add a picture: