Page 1 of 1

error rc2135, problem with VC resource file

Posted: Mon Jun 14, 2010 12:15 pm
by Gnawer
Hello everybody,
I have a simple wx resource file like this:

amain ICON "DInsp.ico"
dinsp_logo BITMAP "di12_logo.bmp"

#define wxUSE_NO_MANIFEST 0
#include "wx/msw/wx.rc"


VC++ 2008 Professional doesn't compile. Include path ist set to "C:\Programme\wxWidgets2.8\include;.\res".

1>Ressourcen werden kompiliert...
1>.\res\DInsp.rc(1) : error RC2135 : file not found: ICON
1>.\res\DInsp.rc(2) : error RC2135 : file not found: BITMAP
1>C:\Programme\wxWidgets2.8\include/wx/msw/wx.rc(30) : error RC2135 : file not found: MENU
1>C:\Programme\wxWidgets2.8\include/wx/msw/wx.rc(32) : error RC2135 : file not found: POPUP
1>C:\Programme\wxWidgets2.8\include/wx/msw/wx.rc(34) : error RC2135 : file not found: MENUITEM
1>C:\Programme\wxWidgets2.8\include/wx/msw/wx.rc(35) : error RC2135 : file not found: MENUITEM


It seems that VC doesn't know the keywords ICON, BITMAP, etc. VC says not "DInsp.ico not found". What's wrong with it?

Posted: Tue Jun 15, 2010 8:44 am
by Gnawer
I've found that 1st name in rc file is always NOT recognized.
After hours of examination I found, that the rc file has some invisible extra bytes at the beginning: EF BB BF

Perhaps that means Unicode Format. After rewriting the rc file by hand with notepad it works. :)

Re: error rc2135, problem with VC resource file

Posted: Thu Aug 08, 2019 8:41 am
by Ksawery
I have encountered the same problem, how did you re-write the .rc file?

Re: error rc2135, problem with VC resource file

Posted: Thu Aug 08, 2019 9:05 am
by doublemax
EF BB BF is just a UTF8 byte order mark. Load it into Notepad++ and under "Encoding" select "Convert to UTF-8" and save.

Re: error rc2135, problem with VC resource file

Posted: Thu Aug 08, 2019 9:05 am
by PB
Those "extra bytes" is probably UTF-8 Byte Order Mark (BOM).

Assuming the file does not contain any Unicode or Code Page specific characters; you can just open the resource file in Notepad, from the menu select "Save As" and in the save dialog set "Encoding" to "ANSI".