Hello, I can't seem to assemble resources succesfully with masm32?

Started by New noob!, December 07, 2008, 10:28:30 PM

Previous topic - Next topic

New noob!

Hi, total and utter noob here trying to get my head around 32bit assember at present.  I have a problem with Iczelion's tutorial number 25: I can't seem to make a succesful resource assemble with masm32 I wonder if someone can help me.

Theres SimpleBitmap.asm, SimpleBitmap.rc and tweety78.bmp are the relevent files I think.

I've tried renaming them as rsrc.rc and rsrc.asm and assembling (since it seems masm32 requires them to be called that) but I'm getting all sorts of Link errors.....

I can make a succesful assemble if I write my own batch file:

cd c:\

C:\masm32\bin\ml /c /coff /Cp rsrc.asm

C:\masm32\bin\rc rsrc.rc

C:\masm32\bin\link /SUBSYSTEM:WINDOWS /LIBPATH:c:\masm32\lib rsrc.obj rsrc.res


(I copied the files to c:\ for simplicity's sake) and then it assembles fine and the program works fine. But masm32 is failing for some reason  :(

EDIT: never mind, I've worked it out. the .asm file needs to be called something different from the the .rc file or it fails for some reason.

Vortex

Hi New noob!,

Welcome to the forum.

You should always give different names to the asm files and resource files. This is the best practice. However, if you wish to give the same name you should change the order of processing :

C:\masm32\bin\rc rsrc.rc

C:\masm32\bin\ml /c /coff /Cp rsrc.asm

C:\masm32\bin\link /SUBSYSTEM:WINDOWS /LIBPATH:c:\masm32\lib rsrc.obj rsrc.res


I guess the reason is that rc.exe calls \masm32\bin\cvtres.exe, the Resource To Object Converter.