News:

Masm32 SDK description, downloads and other helpful links
Message to All Guests

Main Menu

MASM example code needed

Started by jayanthd, March 15, 2013, 08:13:46 PM

Previous topic - Next topic

jayanthd

Quote from: dedndave on March 17, 2013, 04:04:16 AM
what i neglected to mention, before....

RC.exe compiles the RC file to a RES file, RC -> RES
CVTRES.exe converts the RES file to an OBJ file that may be linked, RES -> OBJ

Pelle's linker has the capability to link RES files, directly, so a step is eliminated


I created the rcdlg.RES file from rcdlg.RC file using rc.exe and Then I created rcdlg.obj file from rcdlg.res using cvtres.exe


What is pelles's linker? Is it polink.exe?


But when I compile rcdlg.asm it also created rcdlg.obj and overwrites the rcdlg.obj created earlier.

Gunther

Hi jayanthd,

Quote from: jayanthd on March 17, 2013, 04:23:01 AM
What is pelles's linker? Is it polink.exe?

yes, it's polink.exe.

Quote from: jayanthd on March 17, 2013, 04:23:01 AM
But when I compile rcdlg.asm it also created rcdlg.obj and overwrites the rcdlg.obj created earlier.

You could solve that problem with a command line switch. Please check out ml /?. I think it's the switch ml /Fo, which lets you specify another output name for the OBJ file.

Gunther
You have to know the facts before you can distort them.

dedndave

Quote from: jayanthd on March 17, 2013, 04:23:01 AM
But when I compile rcdlg.asm it also created rcdlg.obj and overwrites the rcdlg.obj created earlier.

if you look at the batch file i created,
you will notice that the OBJ created from the resource file is renamed to "rsrc" to avoid this conflict

Gunther

Hi jayanthd,

so, you've the full answer for your question.

Gunther
You have to know the facts before you can distort them.

dedndave

perhaps he doesn't understand how to view/edit batch files
they are text files, but if you double-click on them, they execute   :P

to edit or view a batch file, right-click, then open with - i generally use notepad

Gunther

Quote from: dedndave on March 17, 2013, 06:20:37 AM
to edit or view a batch file, right-click, then open with - i generally use notepad

Any text editor will do the job.

Gunther
You have to know the facts before you can distort them.

dedndave

i just opened one
i used right click - edit   :P
it opened in notepad

japheth

Quote from: jayanthd on March 17, 2013, 04:23:01 AM
I created the rcdlg.RES file from rcdlg.RC file using rc.exe and Then I created rcdlg.obj file from rcdlg.res using cvtres.exe

It's not necessary to launch cvtres.exe explicitly - it's called by MS link internally whenever it detects an input file to be a compiled resource. Also, this "strategy" avoids possible naming conflicts - as in your case.

jayanthd

Thanks everybody. dedndave's files are working but I am not able to use his batch file for other versions of RCDlg posted in this thread. I opened the batch file in edit pad and changed the file names according to the other RCDlg versions but when I use the batch file to build the projects it says cannot open file... when I get some time I will post the screenshots.


I know how to edit batch files. I learn't that while using DOS.  ;)




dedndave

i wrote that batch file specifically for that project
if it can't find the file, then you have to examine the names used in the batch more closely
you could replace the project name in the batch with %1, then provide the project name on the batch command line
that assumes that all the files have the same base filename


QuoteIt's not necessary to launch cvtres.exe explicitly - it's called by MS link internally whenever it detects an
input file to be a compiled resource. Also, this "strategy" avoids possible naming conflicts - as in your case.
thanks for the tip, Andreas - i'll give it a try   :t