home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!news.claremont.edu!nntp-server.caltech.edu!hzatz
- From: hzatz@cco.caltech.edu (Harold Zatz)
- Newsgroups: comp.sys.sgi.bugs
- Subject: C++ atexit() doesn't work
- Date: 4 Jan 1993 22:17:25 GMT
- Organization: Rhythm & Hues, Inc.
- Lines: 28
- Sender: Harold Zatz (hzatz@rhythm.com)
- Distribution: world
- Message-ID: <1iad1lINNnn7@gap.caltech.edu>
- NNTP-Posting-Host: alumni.caltech.edu
-
- On an Elan R4000, running 4.0.5F, with a version of the C++ library
- that looks like:
- krazy % ll /usr/lib/libC.a
- -r--r--r-- 1 root wheel 161188 Oct 2 19:48 /usr/lib/libC.a
-
- atexit() doesn't work with C++. Try this program:
- -----test.c-----
- #include <stdlib.h>
- #include <stdio.h>
-
- void doMe() {
- fprintf( stderr, "atexit() works!\n" );
- }
-
- main() {
- atexit( doMe );
- exit( 0 );
- }
- -------
- krazy % cc -o test test.c
- krazy % test
- atexit() works!
- krazy % CC -o test test.c
- krazy % test
-
- Fixes? Workarounds? Anyone?
-
- --Harold Zatz
-