Fatal Error C1189 #error _win32_winnt Settings
Contents |
_WIN32_IE setting Visual Studio Languages , Windows Desktop Development > Visual C++ Question 0 Sign in to vote This error ntddi_version  occurred when I run the sample of "AudioCap" of directShow. 1>------ Build
_win32_windows
started: Project: AudioCap, Configuration: Debug Unicode Win32 ------1>Compiling...1>StdAfx.cpp1>c:\program files\microsoft sdks\windows\v6.0a\include\sdkddkver.h(217) : fatal error C1189: #error :Â _WIN32_WINNT
Winver
settings conflicts with _WIN32_IE setting1>Build log was saved at "file://e:\directshow\Extras\DirectShow\Samples\C++\DirectShow\Capture\AudioCap\Debug_Unicode\BuildLog.htm"1>AudioCap - 1 error(s), 0 warning(s)========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========--------------------------------------------------------------------------------------------------------#if ((_WIN32_WINNT < _WIN32_WINNT_WIN2K) && (_WIN32_IE > _WIN32_IE_IE60SP1))#error _WIN32_WINNT settings conflicts with _WIN32_IE setting#endif Tuesday, October 27, 2009 5:10 AM Reply | Quote Answers 1 Sign in to vote Hi Cutedevil,The cause of this issue is version of _WIN32_WINNT definition is too old, definition as below: #ifndef _WIN32_WINNT #define _WIN32_WINNT 0x0400 #endif 0x0400 is too old comparison with _WIN32_IE definition in VS 2008 Platform SDK, we’d better change to 0x0501 or higher version to avoid this issue, or delete _WIN32_WINNT definition. But considering VC compatibility, I would suggest you change the definition like this: #if _MSC_VER <= 1200 // MFC 6.0 or earlier #ifndef _WIN32_WINNT #define _WIN32_WINNT 0x0400 #endif #endif Best Regards,NancyPlease remember to mark the replies as answers if they help and unmark them if they provide no help. Welcome to the All-In-One Code Framework! If you have any feedback, please tell us. Marked as answer by cutedevil Thursday, October 29, 2009 11:01 AM Thursday, October 29, 2009 6:30 AM Reply | Quote All replies 0 Sign in to vote http://blogs.msdn.com/oldnewthing/archive/2007/04/11/2079137.aspx http://social.msdn.microsoft.com/forums/en-US/vcgeneral/thread/6072b017-9e1b-47f8-b504-3daa2683c43c/ Tuesday, October 27, 2009 10:57 AM Reply | Quote 1 Sign in to vote Hi Cutedevil,The cause of this issue is version of _WIN32_WINNT definition is too old, definition as below: #ifndef _WIN32_WINNT #define _WIN32_WINNT 0x0400 #endif 0x0400 is too old comparison with _WIN32_IE definition in VS 2008 Platform SDK, we’d better change to 0x0501 or higher version to avoid this issue, or delete _WIN32_WINNT definition. But consi
here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss the workings and policies of this site About Us Learn more about Stack Overflow the company Business Learn more about hiring developers or posting ads with us Stack Overflow Questions Jobs Documentation Tags Users Badges Ask Question x Dismiss Join the Stack Overflow Community Stack Overflow is a community of 4.7 million programmers, just like you, helping each other. Join them; it only takes a minute: Sign up NTDDI_VERSION setting conflicts with _WIN32_WINNT https://social.msdn.microsoft.com/Forums/vstudio/en-US/59c2b9c1-0627-4112-a973-73bed37313dc/fatal-error-c1189-error-win32winnt-settings-conflicts-with-win32ie-setting?forum=vcgeneral setting up vote 2 down vote favorite With VS2010 I have this error: error C1189: #error : NTDDI_VERSION setting conflicts with _WIN32_WINNT setting in StdAfx.h is use: #define _WIN32_WINNT 0x0502 and in my other source my.cpp i use: #define NTDDI_VERSION 0x06000000 How I can solve that? c++ windows winapi share|improve this question edited Jan 9 '14 at 20:17 Kara 3,15773147 asked Jan 9 '14 at 20:15 http://stackoverflow.com/questions/21030230/ntddi-version-setting-conflicts-with-win32-winnt-setting user2997361 2115 3 The best is to let Microsoft's headers figure out these symbols after setting _WIN32_WINNT. You have done the opposite. –Cheers and hth. - Alf Jan 9 '14 at 20:18 What's with all the hard-coded hex values in both the question and the answers? There are named constants for all these values. –Carey Gregory Jan 10 '14 at 5:04 add a comment| 2 Answers 2 active oldest votes up vote 6 down vote accepted #define NTDDI_VERSION 0x06000000 That is Vista. #define _WIN32_WINNT 0x0502 That is Server 2003. And so these versions are indeed conflicting. If you want to support Vista and up you'll need: #define NTDDI_VERSION 0x06000000 #define _WIN32_WINNT 0x0600 If you want Server 2003 and up then you use: #define NTDDI_VERSION 0x05020000 #define _WIN32_WINNT 0x0502 Note that the NTDDI_VERSION define can also specify service packs. So if you want Vista SP1 and up then you use: #define NTDDI_VERSION 0x06000100 #define _WIN32_WINNT 0x0600 As a general rule you want to set these defines to the value corresponding to the minimum version that you wish to support. Rather than using these magic constants, you should write, for example: #define NTDDI_VERSION NTDDI_VISTA
Forum Visual C++ & C++ Programming Visual C++ Programming WINVAR problem If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to http://forums.codeguru.com/showthread.php?470058-WINVAR-problem register or Login before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. Results 1 to 5 of 5 Thread: WINVAR problem Tweet Thread Tools Show Printable Version Email this Page… Subscribe to this Thread… Display Linear Mode Switch to Hybrid Mode Switch to Threaded Mode February 3rd, 2009,07:54 AM #1 miroslav_karpis View Profile View Forum Posts fatal error Junior Member Join Date Dec 2008 Posts 16 WINVAR problem Hi, please can you help me with this? Application for NT comp (that will run on Windows NT) was built with 'Visual c++ 2005'. Program was running - no problem. Now I have moved the source to 'Visual c++ 2008' and when I executed the program on NT I got message that 'this application is not for Windows'. During building I have seen fatal error c1189 an WINVAR warning (WINVAR not defined - putting value 0x600) - I think that this might be the problem. So I defined it as 0x400 (should be for NT) but now I'm getting error: microsoft sdks\windows\v6.0a\include\sdkddkver.h(217) : fatal error C1189: #error : _WIN32_WINNT settings conflicts with _WIN32_IE setting hmmmm....did you experience something similar? Reply With Quote February 3rd, 2009,08:00 AM #2 VictorN View Profile View Forum Posts Super Moderator Power Poster Join Date Jan 2003 Location Wallisellen (ZH), Switzerland Posts 18,674 Re: WINVAR problem How to: Modify WINVER and _WIN32_WINNT Victor Nijegorodov Reply With Quote February 4th, 2009,12:57 AM #3 miroslav_karpis View Profile View Forum Posts Junior Member Join Date Dec 2008 Posts 16 Re: WINVAR problem Originally Posted by VictorN How to: Modify WINVER and _WIN32_WINNT many thanks - that helped for the errors but on the NT comp I'm still getting the same problem when I want to execute the program. Unfortunately the NT is German so the message is: "program.exe ist keine zulässige Anwendung für Windows." Reply With Quote February 4th, 2009,01:19 AM #4 miroslav_karpis View Profile View Forum Posts Junior Member Join Date Dec 2008 Posts 16 Re: WINVAR problem I have found something like this, but it is for foxpro http://support.microsoft.com/kb/194781 Reply With Quote February 5th, 2009,07:53 AM #5 miroslav_karpis View Profile Vi