LINUX.IE, website of the Irish Linux Users' Group
Tux rules!

   
Home
New Users
Articles
Download
Projects
Community
Vendors

  Print Version
 
Archives:


planetILUG

Recent News

News Archive


Join the
ILUG
on FaceBook


Join the
ILUG
on LinkedIn


Join the
ILUG SETI
Group



















 
 :: Mailing Lists

[ILUG] Confirming versions

[ILUG] Confirming versions

Kenn Humborg kenn at linux.ie
Thu Dec 14 00:27:19 GMT 2000


On Wed, Dec 13, 2000 at 03:39:24PM -0800, Mark Fallon wrote:
> Hi,
> 
> I am trying to find a way to identify object files so that I can check
> that all the objects in one archive(library) have the same version.
> 
> I have looked at using the rcsid tags and ident put these get stripped
> out by the compiler when I use any level of optimisation. Is there any
> way of doing this automatically, and it must be portable so #pragma's
> is not the way to go.

Instead of declaring the string as static (which is convenient because
you can use the same variable name for each string), use a different
name (to keep the linker happy) and remove the static (forces compiler
to emit the string in the .o, because it can't know if it is used by
other .o files):

------  foo.c  ------
const char foo_ver[] = "@(#) $Id";

------  bar.c  ------
const char bar_ver[] = "@(#) $Id";

Later,
Kenn





More information about the ILUG mailing list
Read this without the formatting.
                                                                                                    

 

Hosted by HEAnet


Maintained by the ILUG website team. The aim of Linux.ie is to support and help commercial and private users of Linux in Ireland. You can display ILUG news in your own webpages, read backend information to find out how. Networking services kindly provided by HEAnet, server kindly donated by Dell. Linux is a trademark of Linus Torvalds, used with permission. No penguins were harmed in the production or maintenance of this highly praised website. Looking for the Indian Linux Users' Group? Try here. If you've read all this and aren't a lawyer: you should be!
RSS Version
Powered by Dell