fatal error C1189: #error : This file requires _WIN32_WINNT to be #defined at least to 0x0500. Value 0x0501 or higher is recommended.

0

Today i upgraded my Visual Studio 2008 MFC app to Visual Studio 2010 and got the following error message when i compiled it for the first time

fatal error C1189: #error :  This file requires _WIN32_WINNT to be #defined at least to 0x0500.

Value 0x0501 or higher is recommended.

After figuring out the problem i would like to share it with you guys so it might save some of your precious time

Open stdafx.h file in your visual studio project and change to below values to fix the problem

#ifndef WINVER
#define WINVER 0x0501
#endif

#ifndef _WIN32_WINNT
#define _WIN32_WINNT 0x0501
#endif

#ifndef _WIN32_WINDOWS
#define _WIN32_WINDOWS 0x0501
#endif

#ifndef _WIN32_IE
#define _WIN32_IE 0x0500
#endif

Let me know if you find it useful

Get Free Email Updates!

Signup now and receive free offers, discounts & coupon codes

I agree to have my personal information transfered to Mad Mimi ( more information )

I will never give away, trade or sell your email address. You can unsubscribe at any time.

Leave a Reply

Your email address will not be published. Required fields are marked *

CommentLuv badge

This site uses Akismet to reduce spam. Learn how your comment data is processed.