Article View: gnu.g++.help
Article #14Global Constructors
From: Michael.Conner
Date: Thu, 29 Oct 1992 01:08
Date: Thu, 29 Oct 1992 01:08
41 lines
950 bytes
950 bytes
I'm Having a problem with gcc-2.2.2 on DG/UX. The constructors for
global objects aren't getting run at all.
Example:
#include <iostream.h>
class foo {
public:
foo();
private:
int i;
};
foo::foo() {
cout << "in foo" << endl;
}
foo bar;
main () {
foo bar2;
}
gives:
in foo
for output. Obviously, there should be 2 of these. This works just
fine on ISC R3.2. So what gives? Any ideas would be much appreciated.
Thank You for your support.
--
Michael.Conner@mixcom.com
Technical Details
Message-ID:
<1992Oct29.010859.17522@mixcom.com>Path:
arc1-ca.pugleaf.net!sparky!uunet!spool.mu.edu!mixcom.com!Michael.ConnerShow Full Headers
Complete Article Headers
Newsgroups: gnu.g++.help Path: arc1-ca.pugleaf.net!sparky!uunet!spool.mu.edu!mixcom.com!Michael.Conner From: Michael.Conner <Michael.Conner@mixcom.mixcom.com> Subject: Global Constructors Organization: Milwaukee Internet Xchange BBS, Milwaukee, WI U.S.A. Distribution: usa Date: Thu, 29 Oct 1992 01:08:59 GMT Message-ID: <1992Oct29.010859.17522@mixcom.com> Sender: ddyydd@mixcom.com (Michael J. Conner) Lines: 41