Visual Studio C++智能感知问题
从 VS 2005 转换到 VS 2010 后,我的项目似乎遇到了两个问题。
IntelliSense:命令行错误:无效的宏定义: _WIN32_WINNT>=0x0501
而且我似乎也无法对任何方法或属性执行“调用层次结构”。
如果有人能帮助我解决这些问题,我将不胜感激。谢谢
I seem to be having two issues with my project after I converted from VS 2005 to VS 2010.
IntelliSense: command-line error: invalid macro definition:
_WIN32_WINNT>=0x0501
And I also cant seem to be able to do a "Call Hierarchy" on any of the methods or properties.
I would appreciate if someone can help me with these. Thanks
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
我刚刚遇到了同样的问题 - 相同的错误消息、相同的不起作用的调用层次结构和运行不良的智能感知。
问题出在项目中的预处理器标志上,定义了以下内容:
WIN32;_DEBUG;WINVER=0x501;_WIN32_WINNT 0x0501
请注意
_WIN32_WINNT 之后缺少
。添加=
=
解决了所有问题。PS,这是一个不使用任何 Windows 头文件的控制台应用程序,这就是为什么缺少 _WIN32_WINNT 宏并没有导致更严重的问题。
I just encountered the same issue - the same error message, the same non-functioning call hierarchy and badly-working Intellisense.
The problem was with the preprocessor flags in the project, the following were defined:
WIN32;_DEBUG;WINVER=0x501;_WIN32_WINNT 0x0501
Notice the lack of
=
after_WIN32_WINNT
. Adding the=
fixed all the issues.P.S., this is a Console application that doesn't use any of the Windows header files, which is why the lack of the _WIN32_WINNT macro did not cause a more severe problem.
决定忽略智能感知警告。调用层次结构不起作用,因为我处于发布模式。应该处于调试模式。
Decided to ignore the intellisense warnings. The call hierarchy wasn't working because I was in the release mode. Should be in debug mode.