Click here to Skip to main content
12,756,447 members (30,718 online)
Rate this:
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 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. :)
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 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
Albert Holguin 25-Apr-11 10:20am
my 5
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).
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
Top Experts
Last 24hrsThis month

Advertise | Privacy | Mobile
Web02 | 2.8.170217.1 | Last Updated 25 Apr 2011
Copyright © CodeProject, 1999-2017
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