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