Life is Good.

Enhance Tech and English
随笔 - 65, 文章 - 20, 评论 - 21, 引用 - 0
数据加载中……

Errors on Updating from VS2008 to VS2010

项目从VS2008升级到VS2010的过程中, 碰到挺多问题,
1. C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\atlmfc\include\atlcore.h(35): fatal error C1189: #error :  This file requires _WIN32_WINNT to be #defined at least to 0x0403. Value 0x0501 or higher is recommended.

Causes in staafx.h:
#ifndef _WIN32_WINNT        // Allow use of features specific to Windows XP or later.                  
#define _WIN32_WINNT 0x0401    // Change this to the appropriate value to target other versions of Windows.
#endif                       

Fix:
#ifndef _WIN32_WINNT        // Allow use of features specific to Windows XP or later.                  
#define _WIN32_WINNT 0x0501    // Change this to the appropriate value to target other versions of Windows.
#endif 

2. acrxEntryPoint.cpp
    v:\acade\acepageman\AcePrmNavManager.h(88): error C2011: '__EventingCriticalSectionStub' : 'struct' type redefinition
          v:\acade\acepageman\AcePrmNavManager.h(88) : see declaration of '__EventingCriticalSectionStub'
    v:\acade\acepageman\AcePrmNavManager.h(88): error C2953: '__eventingGetAddr' : class template has already been defined
          v:\acade\acepageman\AcePrmNavManager.h(88) : see declaration of '__eventingGetAddr'
    v:\acade\acepageman\AcePrmNavManager.h(88): error C2011: '__eventNode' : 'struct' type redefinition
          v:\acade\acepageman\AcePrmNavManager.h(88) : see declaration of '__eventNode'
    v:\acade\acepageman\AcePrmNavManager.h(88): error C2011: '__eventMainNode' : 'struct' type redefinition
          v:\acade\acepageman\AcePrmNavManager.h(88) : see declaration of '__eventMainNode'
    v:\acade\acepageman\AcePrmNavManager.h(88): error C2079: 'AcePrmInputContextReactor::__EventingCS' uses undefined struct '__EventingCriticalSectionStub'

这个是因为升级到2010, 导致的头文件 <atlevent.h>不能正确的被引用. 在VS2008 中, 用到__event的时候不需要收到引用此头文件, 但是在2010中一定要明确引用, 否则就会出现上面的错误.

posted on 2011-05-10 12:35 Mike Song 阅读(582) 评论(0)  编辑 收藏 引用


只有注册用户登录后才能发表评论。
网站导航: 博客园   IT新闻   BlogJava   知识库   博问   管理