Search code examples
c++visual-studio-2008

Can't open .rc files in Visual Studio for editing, app compiles fine


I get the an RC1107 error when I try to open any RC for editing, but all my libraries and the app itself compile fine.

Error dialog

I saw this question, but besides not having any useful information, it seems to be a slightly different problem.

I've tried a number of things, from closing and reopening Visual Studio, to ensuring the integrity of the .rc and resource.h files by performing a diff with the previous version. I've even tried rebooting my machine. Any other suggestions?


Solution

  • The answer to the question I linked to actually did contain the right answer, but was so vague as to be useless. After some more searching, I found the solution here, namely this response:

    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