home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!zaphod.mps.ohio-state.edu!pacific.mps.ohio-state.edu!linac!att!cbnewsk!cbnewsj!att-out!rutgers!mcdhup!src4src!wozzle!alane
- From: alane@wozzle.linet.org (J. Alan Eldridge)
- Newsgroups: comp.lang.c++
- Subject: Re: More Gnu C++ fun
- Message-ID: <uu5TwB3w165w@wozzle.linet.org>
- Date: 4 Jan 93 04:26:29 GMT
- References: <1992Dec30.195714.9824@adimail.uucp>
- Organization: Disorganization
- Lines: 37
-
- tel@adimail.uucp (Terry Monks) writes:
-
- > This minimal program
- >
- >
- > class node
- > {
- > public:
- > static int level;
- >
- > node(){};
- > };
- >
- > main()
- > {
- > node::level=1;
- > }
- >
- >
- > compiles and links fine using the AT&T compiler from Sun, but will not link
- > under Gnu c++. (sparc-sun-sunos.4.1)
- >
- > I get the message
- > ld: Undefined symbol
- > __4node$level
- >
-
- Try adding:
-
- int node::level;
-
- to your code at file scope.
-
- Should clear it right up.
-
- alane@wozzle.linet.org (J. Alan Eldridge)
- Fido: The University of Walamaloo 1:272/38.473
-