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