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 ?
CodeBug
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 ?
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:
And this for release:
Thomas
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}
Thomas
Thanks Thomas,
But do those options strip all the 'remark' statements i have put in my source code ?
But do those options strip all the 'remark' statements i have put in my source code ?
Originally posted by CodeBug
But do those options strip all the 'remark' statements i have put in my source code ?
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.
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 ?
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 ?
As far as I know remarks have never been included in the .OBJ file. :)