home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #26 / NN_1992_26.iso / spool / gnu / gcc / help / 2476 < prev    next >
Encoding:
Text File  |  1992-11-08  |  1.7 KB  |  46 lines

  1. Newsgroups: gnu.gcc.help
  2. Path: sparky!uunet!zaphod.mps.ohio-state.edu!sol.ctr.columbia.edu!destroyer!wsu-cs!vela!vela!vtessier
  3. From: vtessier@vela.acs.oakland.edu (Vince Tessier)
  4. Subject: I keep getting "ld: Undefined symbol ___main" errors
  5. Message-ID: <vtessier.721264495@vela>
  6. Summary: I screwed up a search/load path somewhere, but where?
  7. Keywords: gcc-2.3.1 sparc sunos4.1.1
  8. Organization: Oakland University, Rochester MI.
  9. Date: Sun, 8 Nov 1992 23:14:55 GMT
  10. Lines: 34
  11.  
  12. Mea culpa, mea maxima culpa ...
  13.  
  14. I violated a cardinal rule by zapping something before its replacement
  15. was proven, and now I can't compile anything with gcc.
  16.  
  17. I used to run gcc-2.2.1 just fine on my sparc.  Then I built 2.2.2, and
  18. within a couple of days 2.3.1, configuring with 
  19.  
  20.     ./configure --target=sparc-sun-sunos4.1.1 --with-gnu-ld
  21.  
  22. The entire build and install process went just fine, compiling the
  23. compiler with itself, installing fixincludes, and so on.  But every time
  24. I try to build another package, I can compile the object modules, but
  25. when I go to link the executable, I get a message of the form
  26.  
  27.     main.o(.text+4): undefined reference to `___main' 
  28.  
  29. If I build without the "--with-gnu-ld" option and make 'collect2' to
  30. call Sun ld, I get 
  31.  
  32.     ld: Undefined symbol ___main 
  33.     collect: /usr/bin/ld returned 2 exit status
  34.  
  35. Of course, I zapped my old gcc-2.2.1 after 2.2.1 and later 2.3.1 built,
  36. compared, and installed without problems; I don't recall how I had
  37. set 2.1.1 up (a while ago).
  38.  
  39. I've looked through INSTALL, README, the info files, and browsed the
  40. sources for gcc and ld, and can't seem to find where I've gone wrong.
  41.  
  42. -- 
  43. Vince Tessier    vtessier@vela.acs.oakland.edu
  44.  
  45. "Think global, act loco."  -- Zippy
  46.