构建 Google 测试时 shellapi 错误
我下载了谷歌测试。 然后我打开“gtest.sln”文件。 转换后,我单击“构建”,但 Visual Studio 2005 反复给出以下错误。 我应该怎么办? 谢谢
3>C:\Program Files\Microsoft Visual Studio 8\VC\PlatformSDK\include\shellapi.h(69) : error C2065: 'WHWND' : undeclared identifier
3>C:\Program Files\Microsoft Visual Studio 8\VC\PlatformSDK\include\shellapi.h(69) : error C2146: syntax error : missing ')' before identifier 'hwnd'
3>C:\Program Files\Microsoft Visual Studio 8\VC\PlatformSDK\include\shellapi.h(69) : warning C4229: anachronism used : modifiers on data are ignored
3>C:\Program Files\Microsoft Visual Studio 8\VC\PlatformSDK\include\shellapi.h(69) : error C2491: 'ShellExecute' : definition of dllimport data not allowed
3>C:\Program Files\Microsoft Visual Studio 8\VC\PlatformSDK\include\shellapi.h(69) : error C2059: syntax error : ')'
I downloaded Google Test.
Then i opened "gtest.sln" file.
After conversion i clicked "build" but Visual Studio 2005 gave the errors below repeatedly.
What should i do?
Thank you
3>C:\Program Files\Microsoft Visual Studio 8\VC\PlatformSDK\include\shellapi.h(69) : error C2065: 'WHWND' : undeclared identifier
3>C:\Program Files\Microsoft Visual Studio 8\VC\PlatformSDK\include\shellapi.h(69) : error C2146: syntax error : missing ')' before identifier 'hwnd'
3>C:\Program Files\Microsoft Visual Studio 8\VC\PlatformSDK\include\shellapi.h(69) : warning C4229: anachronism used : modifiers on data are ignored
3>C:\Program Files\Microsoft Visual Studio 8\VC\PlatformSDK\include\shellapi.h(69) : error C2491: 'ShellExecute' : definition of dllimport data not allowed
3>C:\Program Files\Microsoft Visual Studio 8\VC\PlatformSDK\include\shellapi.h(69) : error C2059: syntax error : ')'
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您可能需要更改包含目录的顺序。
似乎您在包含路径中首先有 PlatformSDK ;尝试将其“向下”移动,以便首先使用 VS 包含目录。可能是 gtest 与您的 PlatformSDK 版本不兼容。
祝你好运!
You probably need to change the order of include directories.
It seems to be you have PlatformSDK first in the include path; try to move it "down" so that VS include directories will be used first. It's probably that gtest is not compatible with your version of PlatformSDK.
Good luck!