home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1993 #3 / NN_1993_3.iso / spool / comp / unix / aix / 13805 < prev    next >
Encoding:
Internet Message Format  |  1993-01-28  |  1.4 KB

  1. Path: sparky!uunet!ukma!hri.com!noc.near.net!ceylon!newshost.gte.com!pop
  2. From: pop@persia.newshost.gte.com (Paul O. Perry)
  3. Newsgroups: comp.unix.aix
  4. Subject: compiling out static char* (RCSid's)
  5. Message-ID: <POP.93Jan28151503@persia.newshost.gte.com>
  6. Date: 28 Jan 93 20:15:03 GMT
  7. Sender: news@ceylon.gte.com
  8. Distribution: comp
  9. Organization: GTE Labs
  10. Lines: 27
  11.  
  12.  
  13. I noticed that the compiler (actually the linker) is smart enough to
  14. remove static char*'s that are not referenced in the code.  However,
  15. this has the unwanted effect of removing the strings that identify
  16. the files that went into a particular binary (in our case rcsid's).
  17. I looked for flags that will stop the linker from doing this, but I
  18. didn't see any (did I miss it ?). 
  19.  
  20. One solution is to change the static char*'s to char*'s making them
  21. globals, but now they have to be unique and I would have to change the
  22. name of the string variable in every file.
  23.  
  24. Anyone have a better solution ?
  25.  
  26. Along the same lines ... anyone have a neat solution to naming the
  27. rcsid's in .h (header) files ?  More and more is going into these
  28. files (particularly if you use C++), and I would like to be able to
  29. make sure that the binary has the correct header files in it.
  30.  
  31. Thanks, Paul.
  32.  
  33. --
  34. ____________________________________________________________________
  35. Paul O. Perry                    pop@gte.com
  36. GTE Laboratories M/S 40             phone: (617)466-2853
  37. 40 Sylvan Road                    fax:   (617)890-9320
  38. Waltham, MA 02254
  39.