我现在需要将以前的VC6工程移植到VS2008,当编译这个MFC DLL时,就出错啦!1>c:\program files\microsoft sdks\windows\v6.0a\include\sdkddkver.h(217) :
fatal error C1189: #error : _WIN32_WINNT settings conflicts with _WIN32_IE setting 很明显宏定义有问题!于是我首先尝试改了以下:由于在本工程中,找不到任何有定义_WIN32_WINNT的地方,所以只好手到在stdafx.h中加上以下几句:
#ifndef _WIN32_WINNT
#define _WIN32_WINNT 0x0501
#endif但是还是报同样的错误。于是我删除了VS2008里面,新的SDK头文件的路径记录,但还是同样的错误~~请问哪位兄弟遇到过这个问题呀,不盛感激!另外,希望能讲解一下这个错误的原因!
fatal error C1189: #error : _WIN32_WINNT settings conflicts with _WIN32_IE setting 很明显宏定义有问题!于是我首先尝试改了以下:由于在本工程中,找不到任何有定义_WIN32_WINNT的地方,所以只好手到在stdafx.h中加上以下几句:
#ifndef _WIN32_WINNT
#define _WIN32_WINNT 0x0501
#endif但是还是报同样的错误。于是我删除了VS2008里面,新的SDK头文件的路径记录,但还是同样的错误~~请问哪位兄弟遇到过这个问题呀,不盛感激!另外,希望能讲解一下这个错误的原因!
解决方案 »
- 为什么ssl vpn能通过gfw ?
- WinXPButtonST.h是什么东西啊?我是初学者
- RtlVolumeDeviceToDosName用法小问题
- 求救:请各位大哥帮我调式一下下面这段程序,谢谢!
- VC6+ADO+Access2000,使用CoUninitialize()时候竟然出错!!!
- 高分!!!如何获取Overlapped的WSASend的发送速度
- 怎么通过程序判断当前网络是否连通,谢谢!mfc+ado(在线)
- picture!!!!!
- 可以修改计算机颜色设置或者分辨率等等的系统函数是什么??
- 使用ATL制作一个winsock控件
- MFC程序在含有中文目录的情况下打不开的问题
- MouseProc函数,MOUSEHOOKSTRUCT结构体。
http://blog.csdn.net/orbit/archive/2008/11/28/3405309.aspx
Workaround:
Create a targetver.h file:
#pragma once// The following macros define the minimum required platform. The minimum required platform
// is the earliest version of Windows, Internet Explorer etc. that has the necessary features to run
// your application. The macros work by enabling all features available on platform versions up to and
// including the version specified.// 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 // Specifies that the minimum required platform is Windows 2000.
#define WINVER 0x0500 // Change this to the appropriate value to target other versions of Windows.
#endif#ifndef _WIN32_WINNT // Specifies that the minimum required platform is Windows 2000.
#define _WIN32_WINNT 0x0500 // Change this to the appropriate value to target other versions of Windows.
#endif#ifndef _WIN32_WINDOWS // Specifies that the minimum required platform is Windows Me.
#define _WIN32_WINDOWS 0x0500 // Change this to the appropriate value to target Windows Me or later.
#endif#ifndef _WIN32_IE // Specifies that the minimum required platform is Internet Explorer 5.5.
#define _WIN32_IE 0x0550 // Change this to the appropriate value to target other versions of IE.
#endifRemove the problematic parts from stdafx.h, and include targetver. Since VS 2008 is not supported, other problems may come up.
Microsoft Windows SDK v6.0A
我也是同样的问题啊!
是在写directshow时出现的故障
5.2. C\C++ - Preprocessor - Preprocessor Definitions = _X86_ [add also DBG for Debug config]
【WIN32;_DEBUG;_X86_;i386;STD_CALL;CONDITION_HANDLING;WIN32_LEAN_AND_MEAN;NT_UP;SRVDBG;DBG;_IDWBUILD;_WIN32_WINNT=0x0400;% (PreprocessorDefinitions)】设置为这个就好了 开始我也是