473,589 Members | 2,653 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

exestr replacement (LNK4224 under vs2005)

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 ?

Nov 8 '06 #1
3 1379

ya*******@gmail .com wrote:
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.program mer.win32 a while
back, but didn't get any usable replies. (See
http://groups.google.co.uk/group/com...88631946ff2589
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

Nov 9 '06 #2
ch*********@pos tmaster.co.uk wrote:
>
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
Nov 9 '06 #3
ch*********@pos tmaster.co.uk a écrit :
I asked this question on comp.os.ms-windows.program mer.win32 a while
back, but didn't get any usable replies. (See
http://groups.google.co.uk/group/com...88631946ff2589
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

Nov 14 '06 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

53
4931
by: Kerberos | last post by:
I followed Dan Cederholm's image replacement tutorial, to replace a header tag by a logo. The h1 is clickable if no CSS is applied but it I replace it by the logo, the area isn't clickable anymore when I pass the mouse over the logo. Is there a way to replace a link by an image that will still be clickable? Thanks, -- Kerberos.
3
9728
by: Vibha Tripathi | last post by:
Hi Folks, I put a Regular Expression question on this list a couple days ago. I would like to rephrase my question as below: In the Python re.sub(regex, replacement, subject) method/function, I need the second argument 'replacement' to be another regular expression ( not a string) . So when I find a 'certain kind of string' in
20
5642
by: Paul D. Boyle | last post by:
Hi all, There was a recent thread in this group which talked about the shortcomings of fgets(). I decided to try my hand at writing a replacement for fgets() using fgetc() and realloc() to read a line of arbitrary length. I know that the better programmers in this group could write a more robust function, but here is my shot at it anyway. I would appreciate people's comments on my fget_line() code below (usage example included). Any...
5
1985
by: GaryDean | last post by:
(my original post was inaccurate but this post accurately describes what I think is a very bad vs2005 bug) short description... Deleting a dataset and recreating it from the dataadapter causes VS.Net 2005 to render the associated .resx and .vb file inoperative. detail... I converted an asp 1.1 vb.net app using the vs2005 conversion wizard and then retested the app after conversion.
1
2321
by: lawrence k | last post by:
Want to replace the limit clause in a query, but can't get it right. What's wrong with this: $pattern = "(.*)limit (.*)"; $replacement = '$1'; $replacement .= "LIMIT $limit"; $replacement .= '$2'; $query = preg_replace ($pattern, $replacement, $query);
5
4940
by: chris_doran | last post by:
/COMMENT has been removed from the linker that comes with VS2005, and use in source code of: #pragma comment(exestr, "this is a string") gives the message: warning LNK4224: /COMMENT is no longer supported; ignored and doesn't put the string in the exe file.
2
6245
by: auditory | last post by:
I have sources written on linux quite long ago. They are compiled good on current linux machine. but not in VS2005. The cause of problem is #include<getopt.h>. Is there any correspoinding files which can be used instead of getopt.h?? I tried xgetopt.h from codeproject http://www.codeproject.com/cpp/xgetopt.asp
0
1390
by: PLS | last post by:
I just recompiled one of my dll projects after instaling VS2005SP1. I now get a warning that I didn't get before: LINK : warning LNK4224: /DEBUG:FULL is no longer supported; ignored And I no longer get a .pdb file for either my dll or the import library. I can't find anything on the MSDN web site about this and there is nothing in the SP1 release notes.
3
2270
by: =?Utf-8?B?RHVrZSAoQU4yNDcp?= | last post by:
I've added a web deployment project and want to use the config section replacement but I'm obviously not understanding something. I have set up an alternate appSettings file, test.appSettings.config, and when I build the appSettings are correctly overridden, but I also end up with a copy of test.appSettings.config in my web site. If I have config sections for several environments they all get copied. How do I stop the copy? I wondered...
0
7931
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
7865
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
1
5731
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5399
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
3849
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
3889
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2374
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
1
1461
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
1198
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.