home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1993 #3 / NN_1993_3.iso / spool / gnu / gcc / help / 3028 < prev    next >
Encoding:
Text File  |  1993-01-25  |  2.2 KB  |  83 lines

  1. Path: sparky!uunet!zaphod.mps.ohio-state.edu!pacific.mps.ohio-state.edu!cis.ohio-state.edu!fsg.COM!maw
  2. From: maw@fsg.COM (Marvin Allen Wolfthal)
  3. Newsgroups: gnu.gcc.help
  4. Subject: (none)
  5. Date: 25 Jan 1993 19:41:01 -0500
  6. Organization: GNUs Not Usenet
  7. Lines: 71
  8. Sender: daemon@cis.ohio-state.edu
  9. Distribution: gnu
  10. Message-ID: <9301260037.AA05262@fsg.com>
  11.  
  12. I'd appreciate your help:
  13. I've built gcc 2.3.3 on a Gateway 486 running ESIX 4.0.3 ((SVR4),
  14. configuring as i486-*-svr4.
  15. The compiler builds flawlessly and -DPOINTER, -DSTATIC and -DLOCAL
  16. in the following program work.
  17.  
  18.  
  19. // foo.h
  20. class foo
  21. {
  22.     private:
  23.     int x;
  24.  
  25.     public:
  26.      foo(int val) { x = val; }
  27.          ~foo() {;}
  28.          void tell(){ printf( "x=%d\n", x ); }
  29. };
  30.  
  31. // foo.cxx
  32. extern "C"
  33. {
  34. #include <stdio.h>
  35. }
  36. #include "foo.h"
  37.  
  38. int main()
  39. {
  40. #if defined(POINTER)
  41.         class foo *f = new foo(5);
  42.         f->tell();
  43. #elif defined(STATIC)
  44.         static class foo f(5);
  45.     f.tell();
  46. #elif defined(LOCAL)
  47.     class foo f(5);
  48.     f.tell();
  49. #endif
  50. }
  51.  
  52. I am however unable to build libg++-2.3 correctly. I can get all the
  53. files to compile only by switching -ansi on and off (varargs '...' is a problem, 
  54. even though I have run fixincludes.svr4 in building gcc)
  55. but in testing I get many linker errors:
  56.  
  57. Undefined            first referenced
  58.  symbol                  in file
  59. .L_B766                             /usr/local/lib/libg++.a(String.o)
  60. .L_B950                             /usr/local/lib/libg++.a(String.o)
  61. .L_B376                             /usr/local/lib/libg++.a(String.o)
  62. .L_B562                             /usr/local/lib/libg++.a(String.o)
  63. .L_B636_e                           /usr/local/lib/libg++.a(String.o)
  64. .L_B567                             /usr/local/lib/libg++.a(String.o)
  65. .L_B701_e                           /usr/local/lib/libg++.a(String.o)
  66. .L_B486_e                           /usr/local/lib/libg++.a(String.o)
  67. .L_B361                             /usr/local/lib/libg++.a(String.o)
  68. .L_B363                             /usr/local/lib/libg++.a(String.o)
  69. .L_B756                             /usr/local/lib/libg++.a(String.o)
  70.  etc
  71.  
  72. What is happening and is it related to collect? When I built collect as ld and
  73. used it I got duplicate __CTOR__ errors.
  74. Many thanks.
  75. Marvin Allen Wolfthal
  76. (617) 277-7392
  77. maw@fsg.com
  78.  
  79.  
  80.  
  81.  
  82.  
  83.