Click here to Skip to main content
Rate this: bad
good
Please Sign up or sign in to vote.
See more: C++
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 25-Apr-11 1:29am
Comments
Richard MacCutchan at 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 at 25-Apr-11 21:11pm
   
good catch, but he shouldn't define there anyway, so your solution is better :)
Richard MacCutchan at 26-Apr-11 3:47am
   
I'm just trying to cover all the bases. :)
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 2

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.
  Permalink  
Comments
vallikelam at 25-Apr-11 9:04am
   
My code is working in debug mode but in release mode it shows like that why
Albert Holguin at 25-Apr-11 10:20am
   
debug must be ignoring your invalid macro statement all together
Richard MacCutchan at 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 at 25-Apr-11 10:20am
   
my 5
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 1

Hi, vallikelam.
Go through this link
http://support.microsoft.com/kb/320479
 
, this will help you.
  Permalink  
v2

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

  Print Answers RSS
0 OriginalGriff 6,249
1 Sergey Alexandrovich Kryukov 5,680
2 CPallini 4,850
3 George Jonsson 3,454
4 Gihan Liyanage 2,522


Advertise | Privacy | Mobile
Web01 | 2.8.140916.1 | Last Updated 25 Apr 2011
Copyright © CodeProject, 1999-2014
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100