Click here to Skip to main content
15,894,405 members
Please Sign up or sign in to vote.
4.00/5 (1 vote)
See more:
Hello
I am getting this error
_WIN32_WINNT not defined. Defaulting to _WIN32_WINNT_MAXVER (see WinSDKVer.h)
I was already defined this _WIN32_WINNT in Preprocessor definitions as
_WIN32_WINNT=0x0502
why i am still getting this error?
please reply me.
Posted
Comments
Richard MacCutchan 25-Apr-11 10:54am    
On reflection, and based on your comment below, I suspect you have added this to your Project properties. However, it is likely that you added it to the properties of the Debug build but not the Release one.
Albert Holguin 25-Apr-11 21:11pm    
good catch, but he shouldn't define there anyway, so your solution is better :)
Richard MacCutchan 26-Apr-11 3:47am    
I'm just trying to cover all the bases. :)

The correct format for the define is
#define _WIN32_WINNT 0x0502

and this statement must come before any #includes in the StdAfx.h, or whatever include you use to build the precompiled headers.
 
Share this answer
 
Comments
vallikelam 25-Apr-11 9:04am    
My code is working in debug mode but in release mode it shows like that why
Albert Holguin 25-Apr-11 10:20am    
debug must be ignoring your invalid macro statement all together
Richard MacCutchan 25-Apr-11 10:30am    
We cannot guess what is happening, please post the code you are using (edit your original question above, and add the detail there).
Albert Holguin 25-Apr-11 10:20am    
my 5
Hi, vallikelam.
Go through this link
http://support.microsoft.com/kb/320479

, this will help you.
 
Share this answer
 
v2

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900