描述I tried loading a small C++ MFC program, and then tried to compile it.I got several messages involving _WIN32_WINNT needing to be #defined to some value, despite having _WIN32_WINNT=0x0501 in the preprocessor constants in project properties. These were in afxv_w32.h, atlcore.h, and afxcomctl32.h. I also got a message that PSCROLLBARINFO was undefined in afxwin.h and afxwin4.inl, although it appears to be defined in winuser.h. Also CCM_SETWINDOWTHEME undeclared in afxcmn3.inl.
登錄 發(fā)布 評(píng)論。
由 brajesh jaishwal 在 2011/10/19 3:34 發(fā)送
keep only this code segment, and comment all other three if you do not need them
#ifndef _WIN32_WINNT // Allow use of features specific to Windows NT 4 or later. #define _WIN32_WINNT 0x0501 // Change this to the appropriate value to target Windows 98 and Windows 2000 or later. #endif if you are using win 7 then use #ifndef _WIN32_WINNT // Allow use of features specific to Windows NT 4 or later. #define _WIN32_WINNT 0x0601 // Change this to the appropriate value to target Windows 98 and Windows 2000 or later. #endif
由 Mike Gold 在 2010/6/9 19:33 發(fā)送
I was also having the issue triggered in atlcore.h
Adding #ifndef _WIN32_WINNT // Allow use of features specific to Windows NT 4 or later. #define _WIN32_WINNT 0x0501 // Change this to the appropriate value to target Windows 98 and Windows 2000 or later. #endif right after #pragma once seemed to solve the problem. Make sure you do a rebuild after adding the line, or you will still get the error.
由 vudv 在 2010/6/2 0:42 發(fā)送
Me too.
Error 1 error C1189: #error : This file requires _WIN32_WINNT to be #defined at least to 0x0403. Value 0x0501 or higher is recommended. d:\vudv programs\program files\microsoft visual studio 10.0\vc\atlmfc\include\atlcore.h 35 Every one can help me!!!!
由 alan93 在 2010/5/11 7:59 發(fā)送
Fix offered by G.M. Did not work for me I got the same error after trying fix applied to stdafx.h
由 rellimG 在 2009/10/8 16:10 發(fā)送
To fix this problem, make your stdafx.h file look like this:
// Modify the following defines if you have to target a platform prior to the ones specified below. // Refer to MSDN for the latest info on corresponding values for different platforms. #ifndef WINVER // Allow use of features specific to Windows 95 and Windows NT 4 or later. #define WINVER 0x0501 // Change this to the appropriate value to target Windows 98 and Windows 2000 or later. #endif #ifndef _WIN32_WINNT // Allow use of features specific to Windows NT 4 or later. #define _WIN32_WINNT 0x0501 // Change this to the appropriate value to target Windows 98 and Windows 2000 or later. #endif #ifndef _WIN32_WINDOWS // Allow use of features specific to Windows 98 or later. #define _WIN32_WINDOWS 0x0501 // Change this to the appropriate value to target Windows Me or later. #endif #ifndef _WIN32_IE // Allow use of features specific to IE 4.0 or later. #define _WIN32_IE 0x0500 // Change this to the appropriate value to target IE 5.0 or later. #endif
由 Microsoft 在 2009/5/25 於 2:56 公佈
Thanks for reporting the issue.
In order to fix the issue, we must first reproduce the issue in our labs. We are unable to reproduce the issue with the steps you provided. Could you please upload a zipped project file to help us reproduce the problem? It would be greatly appreciated if you could provide us with that information as quickly as possible. If we do not hear back from you within 7 days, we will close this issue. Thanks again for your efforts and we look forward to hearing from you. Visual Studio Product Team
由 Microsoft 在 2009/5/22 於 4:44 公佈
Thank you for your feedback, We are currently reviewing the issue you have submitted. If this issue is urgent, please contact support directly(http://support.microsoft.com) |
|