home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!zaphod.mps.ohio-state.edu!pacific.mps.ohio-state.edu!cis.ohio-state.edu!fsg.COM!maw
- From: maw@fsg.COM (Marvin Allen Wolfthal)
- Newsgroups: gnu.gcc.help
- Subject: (none)
- Date: 25 Jan 1993 19:41:01 -0500
- Organization: GNUs Not Usenet
- Lines: 71
- Sender: daemon@cis.ohio-state.edu
- Distribution: gnu
- Message-ID: <9301260037.AA05262@fsg.com>
-
- I'd appreciate your help:
- I've built gcc 2.3.3 on a Gateway 486 running ESIX 4.0.3 ((SVR4),
- configuring as i486-*-svr4.
- The compiler builds flawlessly and -DPOINTER, -DSTATIC and -DLOCAL
- in the following program work.
-
-
- // foo.h
- class foo
- {
- private:
- int x;
-
- public:
- foo(int val) { x = val; }
- ~foo() {;}
- void tell(){ printf( "x=%d\n", x ); }
- };
-
- // foo.cxx
- extern "C"
- {
- #include <stdio.h>
- }
- #include "foo.h"
-
- int main()
- {
- #if defined(POINTER)
- class foo *f = new foo(5);
- f->tell();
- #elif defined(STATIC)
- static class foo f(5);
- f.tell();
- #elif defined(LOCAL)
- class foo f(5);
- f.tell();
- #endif
- }
-
- I am however unable to build libg++-2.3 correctly. I can get all the
- files to compile only by switching -ansi on and off (varargs '...' is a problem,
- even though I have run fixincludes.svr4 in building gcc)
- but in testing I get many linker errors:
-
- Undefined first referenced
- symbol in file
- .L_B766 /usr/local/lib/libg++.a(String.o)
- .L_B950 /usr/local/lib/libg++.a(String.o)
- .L_B376 /usr/local/lib/libg++.a(String.o)
- .L_B562 /usr/local/lib/libg++.a(String.o)
- .L_B636_e /usr/local/lib/libg++.a(String.o)
- .L_B567 /usr/local/lib/libg++.a(String.o)
- .L_B701_e /usr/local/lib/libg++.a(String.o)
- .L_B486_e /usr/local/lib/libg++.a(String.o)
- .L_B361 /usr/local/lib/libg++.a(String.o)
- .L_B363 /usr/local/lib/libg++.a(String.o)
- .L_B756 /usr/local/lib/libg++.a(String.o)
- etc
-
- What is happening and is it related to collect? When I built collect as ld and
- used it I got duplicate __CTOR__ errors.
- Many thanks.
- Marvin Allen Wolfthal
- (617) 277-7392
- maw@fsg.com
-
-
-
-
-
-