Intel® Fortran Compiler
Build applications that can scale for the future with optimized code designed for Intel® Xeon® and compatible processors.

error RC2135 when compiling

sumitm
Beginner
4,749 Views

Hi,

I have a problem compiling an IVF10 dialog box application.

The application compiles fine as is but blows up if I make any change in the dialog box, like add any control

The error is

C:folderlow3d.rc(221): error RC2135 : file not found: 0x4e2a

The .rc file is physically present but the compiler complains it is not there. I made a backup copy of the rc file and if I replace that the application compiles fine. So I cannot make any changes to my dialog box is the problem.

I did a CompareIT between the changed and the old rc file and I see that some things are different

The header is now

// Microsoft Visual C++ generated resource script.

instead of

//Microsoft Developer Studio generated resource script.
By the way the old one was CVF compiled which I had "successfully" recompiled in IVF

IDD_Load_DXF DIALOG DISCARDABLE0,0,371,17 changed to IDD_Load_DXF DIALOGEX 0, 0, 371, 17

More of the differences are shown in the attached picture

I checked the resource.fd and .h files. They got updated with the new control and the rc file too. I tried a different control, same problem.

It complains file not found.

Thanks for any help

Sumit

0 Kudos
14 Replies
sumitm
Beginner
4,749 Views

An Update,

I am manually able to get by

by editing the old.rc file in a text editor

For example I added the following two lines after guessing the controlslocation

EDITTEXT IDC_Pref_loc,129,71,40,14,ES_CENTER | ES_AUTOHSCROLL
LTEXT "Pref Temp ",IDC_STATIC,22,75,103,8
END

I must not be having some setting right from the IDE itself.

I have C++ 2003 and IVF 10

Thanks for any guidance.

0 Kudos
Steven_L_Intel1
Employee
4,749 Views
Please note that it is not the Fortran compiler that is complaining but rather the Microsoft Resource Compiler.

Can you post the actual new .rc file? I think the problem is in a part you didn't show.
0 Kudos
sumitm
Beginner
4,749 Views

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

0 Kudos
Steven_L_Intel1
Employee
4,749 Views
I meant the updated .rc that does NOT work. You can rename it as a .txt and use the Options tab to attach it.
0 Kudos
sumitm
Beginner
4,749 Views

Steve,

Attached is an rc file that I added a new edit box in from the IDE and it stops compiling.

The file is saved as a .txt

Thanks

0 Kudos
Steven_L_Intel1
Employee
4,749 Views
Please also attach, as a txt, your resource.h
0 Kudos
sumitm
Beginner
4,749 Views

Steve,

Pls find attached as a zip

Thanks

0 Kudos
Steven_L_Intel1
Employee
4,749 Views
Curious. Has to do with those two "data" sections at the end. If you add "RCDATA DISCARDABLE" after IDR_DATA1 and IDR_DATA2 that error goes away.

At this point I'll have to ask one of the Win32 programming experts to chime in.
0 Kudos
sumitm
Beginner
4,749 Views

Thanks Steve.

That works. I can add that easily each time.

I will try deleting those two data from .rcand re entering and see if it makes it more compatible.

Thanks for your help

0 Kudos
Jugoslav_Dujic
Valued Contributor II
4,749 Views
For what it's worth, I've seen erratic behavior of MS Resource Editor related with custom data (RCDATA) back in CVF/Visual Studio 97 days. It's been long since, but I assume the current resource editor comes from the same code base.

In my case, an attempt to edit through IDE a .rc file which contained RCDATA in form of references to external files, resulted in "including" the file contents within the .rc file code (in form of BEGIN...0xABCD...END). Not exactly desired or maintainable. While it's not the same as Sumit's situation, it's similar enough that I suspect there's something fishy in that part of the resource editor code. (Btw, Sumit, what are those RCDATA? Isn't it easier to check "External File"=True and put the link to the file rather than its contents -- unless you don't plan to change the data in the future?)
0 Kudos
sumitm
Beginner
4,749 Views

Jugoslav,

Thanks for your input. I havent used that file= extern before and one of my conderations was that my application may not find that external file as since it relies on the user to put in different inputs and they could be all in different directories. Secondly, the installation directory of the application is not fixed. I think it can all work by storing the paths each time but looks more work and complicated. Instead the data that I want to add or modify to the different input files if somehow stored within my exe then I have known control of its location and makes it easier to handle for me.

Thanks though for your helpful suggestion. Always something to learn from you.

Thanks

0 Kudos
Jugoslav_Dujic
Valued Contributor II
4,749 Views
No, you misunderstood. The only difference is for you, i.e. the developer. You can have in the rc file:
IDR_MYDATA  RCDATA  "SomeData.dat"
or
IDR_MYDATA
BEGIN 
 0x4e2a, 0x646f, 0x0d65, 0x200a, 0x2020, 0x303...
END

i.e. you can have "SomeData.dat" as a separate file, that you keep along with sources, or have it "imprinted" into the .rc. When it comes to changing the data, method #1 will be likely much more practical (you edit SomeData.dat with a suitable application rather than guessing what the hex figures mean). For the end user, both methods produce the same result: the binary data are embedded in your executable (and you extract them from the code as before, and do something with them).
0 Kudos
sumitm
Beginner
4,749 Views

Thanks Jugoslav for explaining that.

Eons ago in the old CVF forum it was asked by someone what is the purpose of " Add file to project" and it had an option of choosing not only fortran file types but .dat and even .ppt files. The answer that was given was that it has no meaning for theother file typesand is of no use. The questioner persisted that if it is given it must have some use but answer was "no".

If I understand what you are saying one can add different types of files to the project and link it through the rc file as somedata.ext and if you have a use for it, it can beextracted (perhaps not the right word butthe information would be compiled in the exe)from the exe. Is that correct.

Thanks

0 Kudos
Jugoslav_Dujic
Valued Contributor II
4,749 Views
You don't have to add those files to the project (the resource compiler will refer to them by the relative path from the .rc file), but you certainly may. Compare with e.g. INCLUDEd source files (.fd) or icons (.ico): the application will build correctly even if they're not in the project (because compiler and resource compiler will look for them in the source directory and other relevant directories, once they found references in the corresponding .f90 or .rc files).

However, it's usually convenient to have them listed among project files: for one, you can easily reach them on a double-click. If you have the project under a source control, those files will also be automatically handled by VS built-in source control tools. Etc.
0 Kudos
Reply