Can someone point out a good .rc file for MASM32. I receive a number of error messages using MASM32's rc.exe. Everything works fine as is w/ TASM5's rc.exe.

Posted on 2002-02-04 08:13:48 by DaveTX47
I noticed that microsoft RC is very buggy... (refuse to compile a rc file with an icon resource file name longer than 8.3 in a directory, sometimes...)
Posted on 2002-02-04 08:19:40 by JCP
Thanx for the prompt response. I don't have any icons or bitmaps that exceed 8.3. The makeit.bat file is from Hutch's MASM32 pkg. Comparing it w/ the TASM build file from Barry Kauler's book, TASM does tasm32.exe before compiling the .rc file whereas makeit.bat does the .rc compilation first. One of the errors is DS_3DLOOK is an undefined symbol - this is in the '' file. This is included in my .asm file naturally.
Posted on 2002-02-04 09:03:39 by DaveTX47
Add this line to your resource file....

#include \masm32\include\resource.h

Posted on 2002-02-04 09:26:54 by Mirno
Add this line to your resource file....

#include \masm32\include\resource.h

Iirc, this file is missing in masm32 v7, well not in the right place actually. Copy it from ICZTUTES/TUTE10-1 or -2 to \INCLUDE. It should be there but it disappeared by accident in version 7.

Posted on 2002-02-04 09:46:12 by Thomas
This is just a preference: just place the necessary #defines at the top of your .rc file(copy the macros out from the resource.h) that way you don't need to include resource.h when you share :grin: your source code... Or you can hard code the equivalents from the resource file to your .rc file.
Posted on 2002-02-04 10:12:10 by stryker
As suggested by Mirno and Thomas, I added the 'resource.h' file to my .rc file. I haven't downloaded Hutch's latest MASM32 since I wasn't using the previous version, so I had it in my 'include' subdirectory. It seems to have resolved some of the problems, but I can't tell what problems are left because the MS-DOS window is so small, all I see is messages about creating the string table. However, I'm still not getting a .RES file. Clicking on the MAXIMIZE button does no good. I do appreciate everyone's advice if MASM is the way to go - needless to say I'm not convinced at this point.
Posted on 2002-02-04 12:47:52 by DaveTX47
To make the DOS window readable, right click it's title bar, select properties, click the font tab, and pick a bigger font. :)
Posted on 2002-02-04 13:05:32 by S/390
DaveTX47, I can push ALT+ENTER to get a full screen DOS window (er, command window in WinNT,2K,XP).
Posted on 2002-02-04 13:21:54 by bitRAKE
Resource.h is normally generated by the resource editors. It holds the control ID's and other information used by both the resource compiler and C/C++ programs.
Posted on 2002-02-04 15:45:49 by tank
tank: That's right, but there's also a file with the most used constants for resource files, which is also called resource.h. That's the one I'm talking about.

Posted on 2002-02-04 16:03:56 by Thomas

The guys have told you most of what is happening. With RC.EXE make sure you run the verbose option,

IE => drv:\pth\rc.exe /v yourfile.rc

and this will show you what is happening with the resources you are using.

Using Microsoft tools for MASM means compile the RC script, CVTRES to convert it to an OBJ file and then link it to the other OBJ files at the end of the list.

Sorry about missing RESOURCE.H in the include dir but its needed for any styles that are used in the resource file. WINDOWS.INC has many of these styles as well but they are in ASM format where RC.EXE requires them in C format, thus the need for RESOURCE.H

With RC.EXE, try and use the recommended numerical IDs for controls and other resources as its more efficient and a lot less problematic. I personally use the direct numbers but some resource editors use named equates for the numbers which is a bit more messing around. Using quoted names often leads to errors so its better to avoid them.

Posted on 2002-02-04 17:32:47 by hutch--
Thanx to all for your responses. Hutch, since I have a rather lengthy stringtable, the use of the /v option does not help you to see your error msg's even after going to full DOS screen w/ ALT+ENTER. They flash up the screen and all you see is what the compiler is doing to the stringtable. By not using the /v option, I could see the errors.

I apparently brought a lot of the errors on myself as I changed MENU to MENUEX in the .rc file based on the 12 line 'Template' ex. in the MASM32 pkg, as well as changing all my POPUP's to, for ex. "&File", , , 0.

I guess the moral of the story is don't change something if it isn't broken. A .RES and .OBJ file is now being created. Now I can concentrate on why all my INVOKE's to DialogBoxParam's are generating 'undefined symbol' error msg's to all the dialog box procedures.

Posted on 2002-02-05 07:16:12 by DaveTX47
If you loose the debug spew off the top of a dos box, the thing to do is to re-direct the standard output...

Run the batch file by hand (or exe), and simply add "> result.txt" to the end of the command line. Then open result.txt in an editor of your choice.

Posted on 2002-02-05 07:20:41 by Mirno
Thanx Mirno. That works great - I can now see the first 100 errors in my .ASM file. I expected there would be a lot trying to convert TASM to MASM32.
Posted on 2002-02-05 08:11:39 by DaveTX47
drv:\pth\rc.exe /v yourfile.rc > Yourfile.txt

Enjoy your work, P1
Posted on 2002-02-05 08:20:18 by Pone