I'm trying to build a project as a 'Release' version i.e. without Remarks, unreference procedure, debug info etc etc, and I not too sure of the command line options used for masm and the linker that automatically strip away the above things to build a release version. Looking through the link docs which came with HUTCH's package i came across the /RELEASE option.

Now.. not really knowing what it meant .. assuming it did as I wanted.. i used it.. and my .exe reduced from a 330k to 78k.. seems as though it had done it.

But when looking on MSDN for further details about LINK options, this is what it says for /RELEASE :

This option sets the checksum in the header of an .EXE file.

The operating system requires the checksum for certain files, such as device drivers. It is recommended that you set the checksum for release versions of your programs to ensure compatibility with future operating systems.

The /RELEASE option is set by default when the /SUBSYSTEM:NATIVE option is specified

Ok.. I admit.. I don't have a clue what that means.. but that switch seemed to have the desired result.

Can anyone tell me if I am doing the wrong thing to build a 'release' version ?

Posted on 2002-12-30 06:45:16 by CodeBug
To build a release version just don't build a debug version :grin:. As long as you don't use /Zi /Zd and the like with masm and /debug & /debugtype with link no debug stuff will be included. I don't think the /release switch really does much except for setting the checksum.

I usually use this for debugging:
ml /c /coff /Zi /Zd {files}

link /subsystem:windows /debug /debugtype:cv {files}

And this for release:
ml /c /coff {files}

link /subsystem:windows {files}

Posted on 2002-12-30 08:04:26 by Thomas
Thanks Thomas,

But do those options strip all the 'remark' statements i have put in my source code ?
Posted on 2002-12-30 08:58:01 by CodeBug
Originally posted by CodeBug
But do those options strip all the 'remark' statements i have put in my source code ?

You mean like:
mov eax, ; these remarks?
They're never included and just ignored by the assembler.

Posted on 2002-12-30 09:39:45 by Thomas
Yep, thats the remarks I mean.

I always thought that remarks were included as park of the .obj file unles you instructed otherwise . doesn't the old MASM for DOS do this ?
Posted on 2002-12-30 10:45:36 by CodeBug
As far as I know remarks have never been included in the .OBJ file. :)
Posted on 2002-12-31 19:14:35 by S/390