- Remove From My Forums
-
Question
-
While learning how to create simple windows in an empty win32 project on vs2013, I tried to place a custom icon for the project but it apparently can’t find the path of the said icon.
After declaring and defining WinMain, MsgProc & InitMainInstance functions, I’ve added to the Header Files folder my custom resource1.h as follow :
#define IDR_MYMENU 101 #define IDI_MYICON 201 #define ID_FILE_EXIT 9001 #define ID_STUFF_GO 9002
Then I selected the Resource Files folder and added there a simple .rc file named Res.rc
#include <Windows.h> #include "resource1.h" IDR_MYMENU MENU BEGIN POPUP "&File" BEGIN MENUITEM "E&xit", ID_FILE_EXIT END POPUP "&Stuff" BEGIN MENUITEM "&Go", ID_STUFF_GO MENUITEM "G&o somewhere else", 0, GRAYED END END IDI_MYICON ICON "icon.ico"
And finally, while selecting Resource Files, I’ve added in there an .ico file named obviously icon.ico but still, apparently, the compiler complains saying the file cannot be found.
I’ve already tried to define the icon as
IDI_MYICON ICON "Resource Files//icon.ico"
but still no luck, and thanks in advance for any answer
EDIT : if it can be of any use, here’s a screenshot of how files are placed
-
Edited by
Saturday, November 1, 2014 8:42 PM
-
Edited by
Answers
-
Double click icon.ico in Solution Explorer. If it exists, then Visual Studio will open it. Then select it again in Solution Explorer and check its path in Properties panel. Is it placed in project’s folder?
Note that “Resource Files” is a solution folder and not necessary a real folder on disk. You can also try specifying the full path, but use ‘\’ instead of ‘//’.
-
Marked as answer by
Rphysx
Sunday, November 2, 2014 2:08 PM
-
Marked as answer by
After switching from Visual Studio 2010 to 2012 I got 10 RC2135 errors that looked rather strange in one of my C++ projects.
Error 1 error RC2135: file not found: 0x06 NamedPipesNative.rc 19 1 NamedPipesNative
Error 2 error RC2135: file not found: 1 NamedPipesNative.rc 28 1 NamedPipesNative
Error 3 error RC2135: file not found: 5 NamedPipesNative.rc 29 1 NamedPipesNative
Error 4 error RC2135: file not found: 5 NamedPipesNative.rc 30 1 NamedPipesNative
Error 5 error RC2135: file not found: 0x17L NamedPipesNative.rc 31 1 NamedPipesNative
Error 6 error RC2135: file not found: FILEOS NamedPipesNative.rc 37 1 NamedPipesNative
Error 7 error RC2135: file not found: 0x2L NamedPipesNative.rc 38 1 NamedPipesNative
Error 8 error RC2164: unexpected value in RCDATA NamedPipesNative.rc 41 1 NamedPipesNative
Error 9 error RC2135: file not found: BLOCK NamedPipesNative.rc 43 1 NamedPipesNative
Error 10 error RC2135: file not found: VALUE NamedPipesNative.rc 45 1 NamedPipesNative
Unfortunately I assumed this had something to do with the switch to VS 2012 (it had asked if I wanted to convert the C++ project or not), and I spent a lot of time trying to figure it out based on that assumption. But in fact it was something completely different. In the hopes of helping anyone else who runs into this problem I’ll post the answer in a moment.
asked Mar 6, 2013 at 9:57
As part of the switch to Visual Studio 2012 I had also updated the program version number in the .rc file using a home-made program that processed all of my AssemblyInfo.cs and .rc files, and it had changed the encoding of the .rc file from ANSI to UTF-8. And the Microsoft Resource Compiler can’t read UTF-8 files properly!
http://social.msdn.microsoft.com/Forums/hu-HU/vcgeneral/thread/e212069d-678e-4ac8-957f-7d60d3e1c89f
So the solution is to re-encode the .rc file as ANSI or UTF-16.
answered Mar 6, 2013 at 9:57
RenniePetRenniePet
11.2k7 gold badges77 silver badges103 bronze badges
If you promise to always hand-edit the .rc file, you could put this at beginning of it and the resource compiler will compile utf-8 like an angel,
#pragma code_page(65001)
But once the VS resource editor gets to regenerate the .rc file, it will be all messed up.
answered Jul 20, 2015 at 14:55
techolictecholic
3483 silver badges14 bronze badges
1
You can also use Pre-build event command line to convert your UTF-8 source file before compiling.
Sample steps:
-
exclude your UTF-8 file from compiling.
-
make a copy of your UTF-8 file, rename it
-
add an entry in the Pre-build event command line, converting the original UTF-8 file to the renamed file as UNICODE. This tool may help you.
$(ProjectDir)toolsuniconv.exe UTF8 $(ProjectDir)DocumentBrowserUTF8.rc UCS2 $(ProjectDir)DocumentBrowser.rc
-
in your build scripts (in many cases, Visual Studio .vcxproj file), make it to compile the converted file instead of the original UTF-8 file.
answered Jan 16, 2015 at 3:06
1
После перехода с Visual Studio 2010 на 2012 я получил 10 ошибок RC2135, которые выглядели довольно странно в одном из моих проектов C ++.
Error 1 error RC2135: file not found: 0x06 NamedPipesNative.rc 19 1 NamedPipesNative
Error 2 error RC2135: file not found: 1 NamedPipesNative.rc 28 1 NamedPipesNative
Error 3 error RC2135: file not found: 5 NamedPipesNative.rc 29 1 NamedPipesNative
Error 4 error RC2135: file not found: 5 NamedPipesNative.rc 30 1 NamedPipesNative
Error 5 error RC2135: file not found: 0x17L NamedPipesNative.rc 31 1 NamedPipesNative
Error 6 error RC2135: file not found: FILEOS NamedPipesNative.rc 37 1 NamedPipesNative
Error 7 error RC2135: file not found: 0x2L NamedPipesNative.rc 38 1 NamedPipesNative
Error 8 error RC2164: unexpected value in RCDATA NamedPipesNative.rc 41 1 NamedPipesNative
Error 9 error RC2135: file not found: BLOCK NamedPipesNative.rc 43 1 NamedPipesNative
Error 10 error RC2135: file not found: VALUE NamedPipesNative.rc 45 1 NamedPipesNative
К сожалению, я предположил, что это как-то связано с переходом на VS 2012 (он спросил, хочу ли я преобразовать проект C ++ или нет), и я потратил много времени, пытаясь выяснить это на основе этого предположения. Но на самом деле это было что-то совершенно другое. В надежде помочь кому-нибудь еще, кто сталкивается с этой проблемой, я отправлю ответ через мгновение.
5
Решение
Другие решения
Если вы пообещаете всегда вручную редактировать файл .rc, вы можете поместить это в начало, и компилятор ресурсов скомпилирует utf-8 как ангел,
#pragma code_page(65001)
Но как только редактор ресурсов VS сможет восстановить файл .rc, все будет испорчено.
2
Вы также можете использовать Командная строка события перед сборкой конвертировать исходный файл UTF-8 перед компиляцией.
Примеры шагов:
-
исключить ваш файл UTF-8 из компиляции.
-
сделайте копию вашего файла UTF-8, переименуйте его
-
добавьте запись в командной строке события Pre-build, преобразовав исходный файл UTF-8 в переименованный файл как UNICODE. Этот инструмент может помочь вам.
$ (ProjectDir) tools uniconv.exe UTF8 $ (ProjectDir) DocumentBrowserUTF8.rc UCS2 $ (ProjectDir) DocumentBrowser.rc
-
в ваших сценариях сборки (во многих случаях Visual Studio .vcxproj файл) сделайте так, чтобы он компилировал преобразованный файл вместо исходного файла UTF-8.
1
Steve,
Thanks for responding.
Please find attached the rc file that works now.
Sumit
I dont see an option to upload so I am pasting the rc file
// Microsoft Visual C++ generated resource script.
//
#include «resource.h»
#define APSTUDIO_READONLY_SYMBOLS
/////////////////////////////////////////////////////////////////////////////
//
// Generated from the TEXTINCLUDE 2 resource.
//
#include «afxres.h»
/////////////////////////////////////////////////////////////////////////////
#undef APSTUDIO_READONLY_SYMBOLS
/////////////////////////////////////////////////////////////////////////////
// English (U.S.) resources
#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU)
#ifdef _WIN32
LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US
#pragma code_page(1252)
#endif //_WIN32
/////////////////////////////////////////////////////////////////////////////
//
// Dialog
//
IDD_SET_SCALE DIALOG DISCARDABLE 0, 0, 179, 112
STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU
CAPTION «Change Max and Min Display Range»
FONT 8, «MS Sans Serif»
BEGIN
DEFPUSHBUTTON «Modify Thickness Range»,IDOK,7,32,88,14
LTEXT «Min»,IDC_STATIC,7,14,12,8
EDITTEXT IDC_MINH,20,13,27,14,ES_CENTER | ES_AUTOHSCROLL
LTEXT «Max»,IDC_STATIC,62,14,14,8
EDITTEXT IDC_MAXH,77,14,26,14,ES_CENTER | ES_AUTOHSCROLL
CONTROL «Use AutoScale»,IDC_AT_ADJ,»Button»,BS_AUTOCHECKBOX |
WS_TABSTOP,102,37,63,10
PUSHBUTTON «Rotate && Augment»,IDC_Rotatecmd,115,63,50,31,BS_CENTER |
BS_VCENTER | BS_MULTILINE
GROUPBOX «FEA Options»,IDC_STATIC,7,50,162,55
PUSHBUTTON «Exit»,IDCANCEL,115,14,50,14
EDITTEXT IDC_RotateINP,65,61,40,14,ES_CENTER | ES_AUTOHSCROLL
EDITTEXT IDC_offset_y,65,81,40,14,ES_CENTER | ES_AUTOHSCROLL
LTEXT «Rotate (deg)»,IDC_STATIC,20,64,40,8
LTEXT «Offset Y (cm)»,IDC_STATIC,17,82,42,8
END
IDD_Load_DXF DIALOG DISCARDABLE 0, 0, 371, 178
STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU
CAPTION «Load DXF Profiles for 3D Object»
FONT 8, «MS Sans Serif»
BEGIN
DEFPUSHBUTTON «Show Bottle MD»,IDOK,21,55,79,14
PUSHBUTTON «Exit»,IDCANCEL,288,7,58,14
LTEXT «Numbe
r of Vertical Points»,IDC_STATIC,22,13,80,8
LTEXT «Number of X Sections»,IDC_STATIC,31,29,70,8
LTEXT «Angle Covered by X Sections»,IDC_STATIC,15,40,93,8
LTEXT «Total Angle to Display»,IDC_STATIC,162,11,70,8
LTEXT «Surface Area (sq. in)»,IDC_STATIC,167,27,65,8
LTEXT «True 3D MDE»,IDC_STATIC,186,43,45,8
PUSHBUTTON «Show Bottle Only»,IDC_Bot_Only,19,90,79,14
PUSHBUTTON «Show Axial Stretch»,IDC_Ax_Str,19,105,79,14,NOT
WS_VISIBLE
PUSHBUTTON «Inside Hoop Stretch»,IDC_Hp_Str_I,20,140,79,14,NOT
WS_VISIBLE
PUSHBUTTON «Internal Areal Stretch»,IDC_Ars_Ins,20,157,79,14,NOT
WS_VISIBLE
CTEXT «Selected Files»,IDC_STATIC,113,89,79,14,SS_CENTERIMAGE |
SS_SUNKEN
LISTBOX IDC_DXF_FINAL,112,105,82,66,LBS_SORT |
LBS_NOINTEGRALHEIGHT | LBS_EXTENDEDSEL | WS_VSCROLL |
WS_TABSTOP
CTEXT «Available Files»,IDC_STATIC,290,90,79,14,SS_CENTERIMAGE |
SS_SUNKEN
LISTBOX IDC_DXF_LIST,290,106,79,65,LBS_SORT |
LBS_NOINTEGRALHEIGHT | LBS_EXTENDEDSEL | WS_VSCROLL |
WS_TABSTOP
PUSHBUTTON «Browse»,IDC_Sel_Dir,209,97,50,14
PUSHBUTTON «<— ADD»,IDC_ADD,209,127,50,14
PUSHBUTTON «<— CLEAR»,IDC_CLEAR,209,157,50,14
EDITTEXT IDC_Num_pts,115,7,40,14,ES_CENTER | ES_AUTOHSCROLL
EDITTEXT IDC_Num_X,115,22,40,14,ES_CENTER | ES_AUTOHSCROLL
&
nbsp; EDITTEXT IDC_Ang,115,37,40,14,ES_CENTER | ES_AUTOHSCROLL
EDITTEXT IDC_Ang_T,240,7,40,14,ES_CENTER | ES_AUTOHSCROLL
EDITTEXT IDC_Surface_Ar,240,23,40,14,ES_CENTER | ES_AUTOHSCROLL |
ES_READONLY
EDITTEXT IDC_3DMDE,240,39,40,14,ES_CENTER | ES_AUTOHSCROLL |
ES_READONLY
CONTROL «Non Round Bottles»,IDC_isoval,»Button»,BS_AUTOCHECKBOX |
WS_TABSTOP,288,39,76,10
EDITTEXT IDC_XPROFNUM,240,55,40,14,ES_CENTER | ES_AUTOHSCROLL
PUSHBUTTON «Show Cross Section Profile #»,IDC_SHOWXSEC,123,55,113,
14
CONTROL «Planar Profiles»,IDC_isplanar,»Button»,BS_AUTOCHECKBOX |
WS_TABSTOP,288,50,61,10
CONTROL «Show Data Labels»,IDC_datalabels,»Button»,
BS_AUTOCHECKBOX | WS_TABSTOP,288,61,74,10
PUSHBUTTON «Outisde Hoop Stretch»,IDC_Hp_Str_O,20,122,79,14,NOT
WS_VISIBLE
EDITTEXT IDC_FR_PWR,288,25,30,14,ES_CENTER | ES_AUTOHSCROLL
LTEXT «Stn Fac(1-4)»,IDC_STATIC,322,28,47,8
EDITTEXT IDC_Pref_loc,129,71,40,14,ES_CENTER | ES_AUTOHSCROLL
LTEXT «Preform Temperature Location»,IDC_STATIC,22,75,103,8
END
IDD_PickedSet DIALOG DISCARDABLE 0, 0, 231, 188
STYLE DS_MODALFRAME | WS_MINIMIZEBOX | WS_MAXIMIZEBOX | WS_POPUP |
WS_CAPTION | WS_SYSMENU
CAPTION «Data Specifying ABAQUS input file»
FONT 8, «MS Sans Serif»
BEGIN
DEFPUSHBUTTON «OK»,IDOK,25,7,50,14
PUSHBUTTON «Cancel»,IDCANCEL,125,7,50,14
CONTROL «2D Profile»,IDC_Md2d,»Button»,BS_AUTORADIOBUTTON,26,28,
47,10
CONTROL «3D Profile»
,IDC_Md3d,»Button»,BS_AUTORADIOBUTTON,125,28,
47,10
EDITTEXT IDC_Pkd_set,18,42,168,14,ES_CENTER | ES_AUTOHSCROLL
CONTROL «Use Range Below»,IDC_PkdSetRange,»Button»,
BS_AUTOCHECKBOX | WS_TABSTOP,64,62,85,10
EDITTEXT IDC_Nstart,17,80,40,14,ES_AUTOHSCROLL
EDITTEXT IDC_Nend,83,81,40,14,ES_AUTOHSCROLL
EDITTEXT IDC_Ninc,141,81,40,14,ES_AUTOHSCROLL
CONTROL «Add Air»,IDC_Addair,»Button»,BS_AUTOCHECKBOX |
WS_TABSTOP,52,111,39,10
CONTROL «Add Water»,IDC_Addwater,»Button»,BS_AUTOCHECKBOX |
WS_TABSTOP,113,112,50,10
LTEXT «Start»,IDC_STATIC,25,98,16,8
LTEXT «End»,IDC_STATIC,95,97,14,8
LTEXT «Increment»,IDC_STATIC,145,98,32,8
LTEXT «Node 100000»,IDC_STATIC,52,121,44,8
LTEXT «Node 100001»,IDC_STATIC,114,122,44,8
CONTROL «Temperature Dependent PET Property»,IDC_MatTempDep,
«Button»,BS_AUTOCHECKBOX | WS_TABSTOP,29,140,137,10
EDITTEXT IDC_TempRef,13,158,40,14,ES_CENTER | ES_AUTOHSCROLL
LTEXT «Material Property Reference Temperature (C)»,IDC_STATIC,
65,161,142,8
END
/////////////////////////////////////////////////////////////////////////////
//
// DESIGNINFO
//
#ifdef APSTUDIO_INVOKED
GUIDELINES DESIGNINFO DISCARDABLE
BEGIN
IDD_SET_SCALE, DIALOG
BEGIN
LEFTMARGIN, 7
RIGHTMARGIN, 172
TOPMARGIN, 7
BOTTOMMARGIN, 105
END
IDD_Load_DXF, DIALOG
BEGIN
LEFTMARGIN, 7
RIGHTMARG
IN, 369
TOPMARGIN, 7
BOTTOMMARGIN, 171
END
IDD_PickedSet, DIALOG
BEGIN
LEFTMARGIN, 7
RIGHTMARGIN, 224
TOPMARGIN, 7
BOTTOMMARGIN, 181
END
END
#endif // APSTUDIO_INVOKED
#ifdef APSTUDIO_INVOKED
/////////////////////////////////////////////////////////////////////////////
//
// TEXTINCLUDE
//
1 TEXTINCLUDE DISCARDABLE
BEGIN
«resource.h�»
END
2 TEXTINCLUDE DISCARDABLE
BEGIN
«#include «»afxres.h»»
«
«�»
END
3 TEXTINCLUDE DISCARDABLE
BEGIN
»
«
«�»
END
#endif // APSTUDIO_INVOKED
/////////////////////////////////////////////////////////////////////////////
//
// Icon
//
// Icon with lowest ID value placed first to ensure application icon
// remains consistent on all systems.
CHILDICON ICON DISCARDABLE «icon1.ico»
FRAMEICON ICON DISCARDABLE «ico0001.ico»
/////////////////////////////////////////////////////////////////////////////
//
// Data
//
IDR_DATA1 RCDATA DISCARDABLE
BEGIN
0x4e2a, 0x646f, 0x0d65, 0x200a, 0x2020, 0x3031, 0x3030, 0x3030, 0x2c31,
0x2020, 0x2020, 0x2020, 0x2020, 0x2020, 0x3020, 0x2c2e, 0x2020, 0x2020,
0x2020, 0x2020, 0x2020, 0x3120, 0x2e31, 0x202c, 0x2020, 0x2020, 0x2020,
0x2020, 0x2020, 0x2e30, 0x0a0d, 0x4e2a, 0x6573, 0x2c74, 0x6e20, 0x6573,
0x3d74, 0x6f62, 0x7474, 0x656c, 0x2d31, 0x6552, 0x5066, 0x5f74, 0x202c,
0x6e69, 0x6574, 0x6e72, 0x6c61, 0x0a0d, 0x3031, 0x3030, 0x3030, 0x2c31,
0x0a0d, 0x532a, 0x7275, 0x6166, 0x6563, 0x202c, 0x7974, 0x6570, 0x453d,
0x454c, 0x454d, 0x544e, 0x202c, 0x616e, 0x656d, 0x613d, 0x7269, 0x0a0d,
0x615f, 0x7269, 0x535f, 0x454e, 0x2c47, 0x5320, 0x454e, 0x0d47, 0x2a0a,
0x202a, 0x4c46, 0x4955, 0x2044, 0x4143, 0x4956, 0x5954, 0x4420, 0x4645,
0x4e49, 0x5449, 0x4f49, 0x0d4e, 0x2a0a, 0x4c46, 0x4955, 0x2044, 0x4143,
0x4956, 0x5954, 0x202c, 0x414e, 0x454d, 0x663d, 0x5f6c, 0x6163, 0x6976,
0x7974, 0x2c31, 0x4220, 0x4845, 0x5641, 0x4f49, 0x3d52, 0x6c66, 0x625f,
0x6865, 0x7661, 0x6f69, 0x3172, 0x522c, 0x4645, 0x4e20, 0x444f, 0x3d45,
0x6f62, 0x7474, 0x656c, 0x2d31, 0x6552, 0x5066, 0x5f74, 0x202c, 0x5553,
0x4652, 0x4341, 0x3d45, 0x6961, 0x2c72, 0x4120, 0x424d, 0x4549, 0x544e,
0x303d, 0x312e, 0x3130, 0x3633, 0x0a0d, 0x0a0d, 0x462a, 0x554c, 0x4449,
0x4220, 0x4845, 0x5641, 0x4f49, 0x2c52, 0x4e20, 0x4d41
, 0x3d45, 0x6c66,
0x625f, 0x6865, 0x7661, 0x6f69, 0x3172, 0x0a0d, 0x4d2a, 0x4c4f, 0x4345,
0x4c55, 0x5241, 0x5720, 0x4945, 0x4847, 0x0d54, 0x300a, 0x302e, 0x3030,
0x3230, 0x0d39, 0x2a0a, 0x4143, 0x4150, 0x4943, 0x5954, 0x202c, 0x5954,
0x4550, 0x543d, 0x4241, 0x4c55, 0x5241, 0x0a0d, 0x3033, 0x302e, 0x2b45,
«�66»
END
IDR_DATA2 RCDATA DISCARDABLE
BEGIN
0x4e2a, 0x646f, 0x0d65, 0x200a, 0x2020, 0x3031, 0x3030, 0x3030, 0x2c30,
0x2020, 0x2020, 0x2020, 0x2020, 0x2020, 0x3020, 0x2c2e, 0x2020, 0x2020,
0x2020, 0x2020, 0x2020, 0x3120, 0x2e30, 0x202c, 0x2020, 0x2020, 0x2020,
0x2020, 0x2020, 0x2e30, 0x0a0d, 0x4e2a, 0x6573, 0x2c74, 0x6e20, 0x6573,
0x3d74, 0x6f62, 0x7474, 0x656c, 0x522d, 0x6665, 0x7450, 0x2c5f, 0x6920,
0x746e, 0x7265, 0x616e, 0x0d6c, 0x310a, 0x3030, 0x3030, 0x3030, 0x0d2c,
0x2a0a, 0x4c46, 0x4955, 0x2044, 0x4542, 0x4148, 0x4956, 0x524f, 0x202c,
0x414e, 0x454d, 0x663d, 0x5f6c, 0x6562, 0x6168, 0x6976, 0x726f, 0x0a0d,
0x462a, 0x554c, 0x4449, 0x4420, 0x4e45, 0x4953, 0x5954, 0x0a0d, 0x6531,
0x392d, 0x0a0d, 0x462a, 0x554c, 0x4449, 0x4220, 0x4c55, 0x204b, 0x4f4d,
0x5544, 0x554c, 0x0d53, 0x320a, 0x3030, 0x0d30, 0x2a0a, 0x7553, 0x6672,
0x6361, 0x2c65, 0x7420, 0x7079, 0x3d65, 0x4c45, 0x4d45, 0x4e45, 0x2c54,
0x6e20, 0x6d61, 0x3d65, 0x6177, 0x6574, 0x0d72, 0x5f0a, 0x6177, 0x6574,
0x5f72, 0x4e53, 0x4745, 0x202c, 0x4e53, 0x4745, 0x0a0d, 0x462a, 0x554c,
0x4449, 0x4320, 0x5641, 0x5449, 0x2c59, 0x4e20, 0x4d41, 0x3d45, 0x6c66,
0x635f, 0x7661, 0x7469, 0x2c79, 0x4220, 0x4845, 0x5641, 0x4f49, 0x3d52,
0x6c66, 0x625f, 0x6865, 0x7661, 0x6f69, 0x2c72, 0x4552, 0x2046, 0x4f4e,
0x4544, 0x623d, 0x746f, 0x6c74, 0x2d65, 0x6552, 0x5066, 0x5f74, 0x202c,
0x5553, 0x4652, 0x4341, 0x3d45, 0x6177, 0x6574, 0x0d72, «�12»
END
#endif // English (U.S.) resources
/////////////////////////////////////////////////////////////////////////////
#ifndef APSTUDIO_INVOKED
/////////////////////////////////////////////////////////////////////////////
//
// Generated from the TEXTINCLUDE 3 resource.
//
/////////////////////////////////////////////////////////////////////////////
#endif // not APSTUDIO_INVOKED
error rc2135, problem with VC resource file
Topic is solved
-
Gnawer
- Experienced Solver
- Posts: 65
- Joined: Thu Jun 29, 2006 11:10 am
- Location: Ahlen, Germany
error rc2135, problem with VC resource file
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:ProgrammewxWidgets2.8include;.res».
1>Ressourcen werden kompiliert…
1>.resDInsp.rc(1) : error RC2135 : file not found: ICON
1>.resDInsp.rc(2) : error RC2135 : file not found: BITMAP
1>C:ProgrammewxWidgets2.8include/wx/msw/wx.rc(30) : error RC2135 : file not found: MENU
1>C:ProgrammewxWidgets2.8include/wx/msw/wx.rc(32) : error RC2135 : file not found: POPUP
1>C:ProgrammewxWidgets2.8include/wx/msw/wx.rc(34) : error RC2135 : file not found: MENUITEM
1>C:ProgrammewxWidgets2.8include/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
- Posts: 65
- 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
-
PB
- Part Of The Furniture
- Posts: 3750
- 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».