Click here to Skip to main content
14,828,863 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Dear all,

I'm trying to compile a program written in Visual C++ 2005 in Visual C++ 2008. However, i received an error as follows :

1>fatal error RC1110: could not open ..\..\Tools\wxWindows_2_4_2\include\wx\msw\wx.rc
1>Project : error PRJ0002 : Error result 1 returned from 'C:\Program Files\Microsoft SDKs\Windows\v6.0A\bin\rc.exe'.

I've check all the references, there are no such reference for "..\..\Tools\wxWindows_2_4_2\include\wx\msw\wx.rc". I'm really new in Visual C++. Need your help to solve the problem.

Thank you in advanced.

Hafeez Osman
Posted
Updated 21-Sep-11 23:02pm
v2

Use the tool Find in Files and search for wx.rc in the entire solution. This will indicate where it comes from. Chanses are you are missing a source path or the actual file.
   
v2
Comments
Hafeez Osman 22-Sep-11 5:29am
   
Thank you Mehdi and Niklas. By using Find in Files, there are no wx.rc file in the entire solution. However, this file is located in one of the reference file (wxWindows_2_4_2). For the reference, I've check the resource additional reference stated "..\contrib\wxWindows-2.4.2\include". I don't really understand why the Visual C++ searching for this file path "..\..\Tools\wxWindows_2_4_2\include\wx\msw\wx.rc".

Hafeez Osman
Legor 22-Sep-11 5:40am
   
Are you opening the whole VS2005 solution in VS2008 ? If possible i'd suggest creating a new clean VS2008 project. Copy your source and header files to that, configure possible dependencies and rebuild the whole thing. In my opinion this allways saves a lot of trouble when trying to convert a solution.
Hafeez Osman 22-Sep-11 7:23am
   
The source code is too big... is there any other suggestion...?
Niklas L 22-Sep-11 7:27am
   
Do the Find in Files thing on the wxWindows folder and see how it's all connected.
Hafeez Osman 22-Sep-11 7:44am
   
I've found the file (wx.rc) in wxWindows folder. But, don't know why VC++ could not open this file (may be because it search on "..\..\Tools\wxWindows_2_4_2\include\wx\msw\wx.rc" rather than "..\contrib\wxWindows-2.4.2\include" ) I've check all reference and additional resource path.. all stated "..\contrib\wxWindows-2.4.2\include".
Hafeez Osman 23-Sep-11 5:55am
   
Thanks Niklas, the problem solved but another error appear (LNK2001), I'm currently look into it.
.rc indicates this is a resource compiler file, and it should be listed in Solution Explorer under the heading 'Resources' within your project. If it isn't, add it (although I wouldn't know why VS would search for it then...). If it's already there, try open it. If that doesn't work, remove it and try re-adding it from it's current location. (right-click on Resource Files, then Add -> Add Existing Item... )

I don't know what else to check, but if you look at the properties, under Resources/Command line, the default setting is just one option: the one for defining the actual resouce file ( " /fo <filename> " )

The standard location for the .rc file is right in the project root. If all else fails try moving your rc file there. You will need to remove and re-add it to your solution though.

There's one last thing you could try, but I have no idea if that even works in VS 2008: earlier versions use an ASCII based text file (looks like XML) to store the solution file. You could open that, search for the line describing the location of your .rc file, and manually enter the absolute path of that file.

Caution

Some of the above suggestions may corrupt your solution! I suggested them only because it looks like it's corrupted already. You should keep backup copies of all your files, just in case.
   

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)




CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900