Click here to Skip to main content
Rate this: bad
Please Sign up or sign in to vote.
See more: C++
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
why i am still getting this error?
please reply me.
Posted 25-Apr-11 2:29am
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
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.
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
Please Sign up or sign in to vote.

Solution 1

Hi, vallikelam.
Go through this link

, this will help you.

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

  Print Answers RSS
0 Sascha Lefévre 510
1 Sergey Alexandrovich Kryukov 300
2 Abhinav S 255
3 Maciej Los 210
4 Richard Deeming 105
0 Sergey Alexandrovich Kryukov 6,928
1 OriginalGriff 6,381
2 Maciej Los 2,782
3 Abhinav S 2,732
4 Peter Leow 2,694

Advertise | Privacy | Mobile
Web04 | 2.8.150414.1 | Last Updated 25 Apr 2011
Copyright © CodeProject, 1999-2015
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