[comp.lang.c] MSC 5.1 comment pragma

doug@gethen.UUCP (Doug Asherman) (07/20/88)

Recently, I've been trying to use the comment pragma to place a version
number in an executable file.  According to the Microsoft documentation,
this can be done like so:

#pragma comment(exestr,"ThisProg V1.1");

On page 12 of the MSC 5.1 update docs, it says under "exestr":

"Places the string specified...in the object file.  At link time,
 this string is placed in the executable file....[Stuff deleted]
 ..it can be found with a program that finds printable strings in
 files."

Ok...I've looked through the .exe file using two different programs that
purport to find ASCII strings in any file, and finally viewed the program
sector by sector with a disk editor...but I can't find that string!  In
its place, of course, I just use 'char *version = "ThisProg V1.1";'.

However, I was wondering if anyone has gotten this pragma to work
correctly, and if so, how...the other comment pragmas seem to work
just fine.
-- 
Current Address:                    :  "Get used to disappointment"
                                    :         -William Goldman
{ sun, ptsfa }                      :              from
!hoptoad!unisoft!gethen!doug        :         "The Princess Bride"

Gary_Edmunds_Miller@cup.portal.com (07/22/88)

!hoptoad!unisoft!gethen!doug        wrote: 
>Recently, I've been trying to use the comment pragma to place a version
>number in an executable file.... 
>However, I was wondering if anyone has gotten this pragma to work
>correctly, and if so, how...the other comment pragmas seem to work
>just fine.

If you read the file README.DOC that comes with MSC 5.1 you will find
the following:
"This release does not support the exestr record type of the comment
 pragma".

So now you can quit trying!
RGDS
GARY