error rc2135, problem with VC resource file Topic is solved

Do you have a question about makefiles, a compiler or IDE you are using and need to know how to set it up for wxWidgets or why it doesn't compile but other IDE's do ? Post your questions here.
Post Reply
Gnawer
Experienced Solver
Experienced Solver
Posts: 54
Joined: Thu Jun 29, 2006 11:10 am
Location: Ahlen, Germany

error rc2135, problem with VC resource file

Post by Gnawer » Mon Jun 14, 2010 12:15 pm

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?
Best regards
Gnawer

Gnawer
Experienced Solver
Experienced Solver
Posts: 54
Joined: Thu Jun 29, 2006 11:10 am
Location: Ahlen, Germany

Post by Gnawer » Tue Jun 15, 2010 8:44 am

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. :)
Best regards
Gnawer

Ksawery
Experienced Solver
Experienced Solver
Posts: 69
Joined: Thu Jul 25, 2019 12:31 pm

Re: error rc2135, problem with VC resource file

Post by Ksawery » Thu Aug 08, 2019 8:41 am

I have encountered the same problem, how did you re-write the .rc file?

User avatar
doublemax
Moderator
Moderator
Posts: 14093
Joined: Fri Apr 21, 2006 8:03 pm
Location: $FCE2

Re: error rc2135, problem with VC resource file

Post by doublemax » Thu Aug 08, 2019 9:05 am

EF BB BF is just a UTF8 byte order mark. Load it into Notepad++ and under "Encoding" select "Convert to UTF-8" and save.
Use the source, Luke!

PB
Part Of The Furniture
Part Of The Furniture
Posts: 2057
Joined: Sun Jan 03, 2010 5:45 pm

Re: error rc2135, problem with VC resource file

Post by PB » Thu Aug 08, 2019 9:05 am

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".

Post Reply