exestr replacement (LNK4224 under vs2005)

  • Thread starter Thread starter yan.bilik
  • Start date Start date
Y

yan.bilik

Hello,

I need to keep version information inside static libraries and inside
an exexe file that contains these libraries.
Under VS2003, I was able to add version strings using pragma comment
exestr. Then, using a string extractor, I was able to see which
libraries (and which versions of them) were included inside the
executable.

Since I migrated my code to vs2005, the /COMMENT directive is ignored
by the linker, and I still look at a way to insert string information
inside each library. Note that I need these version strings to be set
in the .lib and to be kept within the exe file that is finally linked
to these libraries.

I have tried to add resource strings, but it seems they are not kept
when I link the exe file. Any suggestion ?
 
Hello,

I need to keep version information inside static libraries and inside
an exexe file that contains these libraries.
Under VS2003, I was able to add version strings using pragma comment
exestr. Then, using a string extractor, I was able to see which
libraries (and which versions of them) were included inside the
executable.

Since I migrated my code to vs2005, the /COMMENT directive is ignored
by the linker, and I still look at a way to insert string information
inside each library. Note that I need these version strings to be set
in the .lib and to be kept within the exe file that is finally linked
to these libraries.

I have tried to add resource strings, but it seems they are not kept
when I link the exe file. Any suggestion ?

I asked this question on comp.os.ms-windows.programmer.win32 a while
back, but didn't get any usable replies. (See
http://groups.google.co.uk/group/co...2589?lnk=gst&q=exestr&rnum=1#cf88631946ff2589
or Google that group on "exestr" to find the thread). I've ended up
using the Comments field of the resource file, with a small utility
(not running on Windows) to create them by extracting the information
from my standardised source file headers. It's nicer than exestrs in
that you can view the list with Explorer/Properties rather than a
string extractor, but obviously not automatic, and only works with exe
files.

Why on earth M$ have removed this invaluable QA feature which is
standard in many other OSes, I can't imagine.

Chris
 
Why on earth M$ have removed this invaluable QA feature which is
standard in many other OSes, I can't imagine.

I can't speak to exestr in particular, but a number of things were removed
from support by #pragma comment because they didn't always work (and
couldn't be made to always work because of when those directives are
processed by the linker - i.e. as each file is read).

-cd
 
(e-mail address removed) a écrit :
I asked this question on comp.os.ms-windows.programmer.win32 a while
back, but didn't get any usable replies. (See
http://groups.google.co.uk/group/co...2589?lnk=gst&q=exestr&rnum=1#cf88631946ff2589
or Google that group on "exestr" to find the thread). I've ended up
using the Comments field of the resource file, with a small utility
(not running on Windows) to create them by extracting the information
from my standardised source file headers. It's nicer than exestrs in
that you can view the list with Explorer/Properties rather than a
string extractor, but obviously not automatic, and only works with exe
files.

Why on earth M$ have removed this invaluable QA feature which is
standard in many other OSes, I can't imagine.

Chris

Hello Chris,

Thanks for your reply.
Yes I have seen your post, but it seems that the /comments work-around
does not work for libraries. I have done a simple test (adding a
comment string resource inside the static library), but it is lost
when the exe is built... Anyway, I will try again to confirm that.

Yan
 
Back
Top