VS2010在编译可以通过VS2005编译的项目时会遇到很多编译错误 [英] VS2010 gets a lot of compilation errors when compile a project which can pass VS2005 compilation

查看:193
本文介绍了VS2010在编译可以通过VS2005编译的项目时会遇到很多编译错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我将解决方案从vs2005移至vs2010,因为该解决方案的一个项目无法成功构建,编译错误为:

I moved my solution from vs2005 to vs2010, after that one project of that solution can not be build successfully, the compile error are:

c:\program files\microsoft sdks\windows\v7.0a\include\driverspecs.h(356): error C2144: syntax error : 'char' should be preceded by ')'
c:\program files\microsoft sdks\windows\v7.0a\include\driverspecs.h(356): error C3861: 'SAL_functionClass': identifier not found
c:\program files\microsoft sdks\windows\v7.0a\include\driverspecs.h(356): error C2059: syntax error : ')'
c:\program files\microsoft sdks\windows\v7.0a\include\driverspecs.h(374): error C2144: syntax error : 'char' should be preceded by ')'
c:\program files\microsoft sdks\windows\v7.0a\include\driverspecs.h(374): error C3861: 'SAL_acquire': identifier not found
c:\program files\microsoft sdks\windows\v7.0a\include\driverspecs.h(374): error C2059: syntax error : ')'
c:\program files\microsoft sdks\windows\v7.0a\include\driverspecs.h(381): error C2144: syntax error : 'char' should be preceded by ')'
c:\program files\microsoft sdks\windows\v7.0a\include\driverspecs.h(381): error C3861: 'SAL_release': identifier not found




似乎__ANNOTATION不起作用.我不知道如何解决这个问题.请帮忙.

感谢一百万!




it seems the __ANNOTATION do not work. I do not know how to solve this problem. Please help.

Thanks a million!

推荐答案

我遇到了这个问题.在项目设置中启用语言扩展后,它消失了.
I had this problem. It went away when I enabled language extensions in the project settings.


常见问题.它们会删除您的全局包含目录,从而迫使您按项目或使用环境变量重新创建它们.他们还更改了一些设置.您还在使用MFC,ATL还是CLR吗?
Common problem. They remove your global include directories, forcing you to recreate them project by project, or with an environment variable. They also change some settings. Also are you using MFC, ATL, or CLR?


我不确定确切的问题是什么(这里没有代码),但请参见
I''m not sure what the exact problem is (there is no code included here), but see here[^]. Double underscores have been removed.


这篇关于VS2010在编译可以通过VS2005编译的项目时会遇到很多编译错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆