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

   
Home
New Users
Articles
Download
Projects
Community
Vendors

  Print Version
Email to...
 
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

Justin Mason jm at jmason.org
Thu Dec 14 11:44:49 GMT 2000


Kenn Humborg said:

> > 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):

Another way is to implement a get_version_string() method or function, or
print them out as part of a usage message etc.  That will avoid the
compiler stripping them.  It is handy for debugging, too.

--j.




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