||
fatal error C1189: #error : This file requires _WIN32_WINNT to be #defined at least to 0x0403
原因:版本迁移设置的系统最低版本过低
Visual C++ 2010 no longer supports targeting Windows 95, Windows 98, Windows ME, or Windows NT. If your WINVER or _WIN32_WINNT macros are assigned to one of these versions of Windows, you must modify the macros. When you upgrade a project that was created by using an earlier version of Visual C++, you may see compilation errors related to the WINVER or _WIN32_WINNT macros if they are assigned to a version of Windows that is no longer supported(From MSDN)
直接原因-在atlcore.h中有如下三行代码:
#if _WIN32_WINNT < 0x0403
#error This file requires _WIN32_WINNT to be #defined at least to 0x0403. Value 0x0501 or higher is recommended.
#endif
解决方法:在VTK目录中所有的stdafx.h文件中参照 http://msdn.microsoft.com/en-us/library/aa383745.aspx 修改WINVER,_WIN32_WINNT,_WIN32_WINDOWS和_WIN32_IE的定义,例如:#define WINVER 0x0501
注意2:以上解决办法中注意一个词:所有!!!慢慢改,找到地方全改成0x0601 IE那如果是IE8改为0x0800
错误2
LINK : warning LNK4199: 已忽略 /DELAYLOAD:vtkIO.dll;未找到来自 vtkIO.dll 的导入
解决办法:在这几个链接错误的工程上,右键属性,在link——Input——Additional dependencies里,加上vtkIO.ilb,就OK了。记得添加路径要正确
注意3:出现几个链接错误的工程,就都如上改就可以了。证实确实解决了问题。
我解决了以上两个问题,即编译通过。
感谢所有网上分享者!正是如此,才能推动科学的进步,也正是如此,我才写了这篇博文,希望能帮助更多的人!
Archiver|手机版|科学网 ( 京ICP备07017567号-12 )
GMT+8, 2024-11-25 10:24
Powered by ScienceNet.cn
Copyright © 2007- 中国科学报社