c++ - 无法在 Visual Studio 中打开 .rc 文件进行编辑,应用编译正常

标签 c++ visual-studio-2008

当我尝试打开任何 RC 进行编辑时出现 RC1107 错误,但我的所有库和应用程序本身都可以正常编译。

Error dialog

我看到了this question , 但除了没有任何有用的信息外,这似乎是一个稍微不同的问题。

我已经尝试了很多方法,从关闭和重新打开 Visual Studio,到通过执行与以前版本的差异来确保 .rc 和 resource.h 文件的完整性。我什至尝试过重新启动我的机器。还有其他建议吗?

最佳答案

我链接到的问题的答案实际上确实包含正确答案,但过于模糊以至于毫无用处。经过更多搜索,我找到了解决方案 here ,即这个响应:

I've had the same issue.

It looks like the include path processing is broken in VS8. I disassembled the resource compiler dll and found that the command line being passed to rcdll.dll was corrupted. The last slash on the include path was being replaced with a quote character. There was no starting quote.

To fix the problem, I made a minor change to the include paths in the IDE.

Tools -> Options -> Projects and Solutions -> VC++ Directories

Show directories for: Include files

I Added a slash to my last path, so "P:\" became "P:\\". Ok the changes and the problem went away. :-)

Hope this works for you.

Andy

关于c++ - 无法在 Visual Studio 中打开 .rc 文件进行编辑,应用编译正常,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/9483587/

相关文章:

c++ - 将工作空间(WINCE设备com)转换为兼容PC的工作空间

asp.net - 在 Visual Studio 2008 中 - 在 web.config 更改 "takes"之前多久?

c# - 如何发布Visual Studio ASP.NET解决方案?

c# - 为什么 C# 编译器不会在静态方法调用实例方法的地方出现错误代码?

c++ - Visual Studio 下拉菜单中灰显的类方法

c++ - 快速内存分配/范围问题

java - GCC 中的外部 "Java" block

c++ - 将 Functor 作为参数传递给方法

c++ - 在方法上调用方法 C++

c++ - 不能在信号/槽/连接例程中传递参数