home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.sys.sun.misc
- Path: sparky!uunet!ukma!usenet.ins.cwru.edu!agate!ames!elroy.jpl.nasa.gov!euclid.JPL.NASA.GOV!pjs
- From: pjs@euclid.JPL.NASA.GOV (Peter J. Scott)
- Subject: _MAIN_ undefined
- Message-ID: <1992Nov6.225941.2375@elroy.jpl.nasa.gov>
- Sender: news@elroy.jpl.nasa.gov (Usenet)
- Nntp-Posting-Host: euclid.jpl.nasa.gov
- Reply-To: pjs@euclid.jpl.nasa.gov
- Organization: Jet Propulsion Laboratory, NASA/Caltech
- Date: Fri, 6 Nov 1992 22:59:41 GMT
- Lines: 33
-
- I get this error from ld when I use -Bstatic but not when I don't.
- This is an IPX running 4.1.2 and I have Fortran 1.4.1. Here's what happens:
-
- f77 -o xodp.e lnktim.f -Bstatic xodp.o files.o list.o io.o y.tab.o templ.o namelist.o cwd.o resources.o -O -pipe -D_NO_PROTO /usr/nav/lib/libWc.a /usr/nav/lib/libXmp.a /usr/nav/lib/libXnav.a -lXm -lXmu -lXt -lX11 -ll -L/usr/lib/X11 -cg89 -libmil
- lnktim.f:
- lnktim:
- ld: Undefined symbol
- _MAIN_
- Compilation failed
-
- Yet, it produces an executable that works just fine (touch wood).
-
- Sun Support told me to apply the 100332-06 jumbo patch but that didn't
- make any difference. The problem is in the link phase, it seems, from
- using the -V flag:
-
- [...]
- version-id of "/bin/ld": Unknown
- /bin/ld -dc -dp -e start -u _MAIN_ -X -L/usr/lib/X11 -o xodp.e /usr/lang/SC1.0.1/crt0.o /usr/lang/SC1.0.1/cg89/_crt1.o -L/usr/lang/SC1.0.1/cg89 -L/usr/lang/SC1.0.1 lnktim.o -Bstatic xodp.o files.o list.o io.o y.tab.o templ.o namelist.o cwd.o resources.o /usr/nav/lib/libWc.a /usr/nav/lib/libXmp.a /usr/nav/lib/libXnav.a -lXm -lXmu -lXt -lX11 -ll -lF77 -lm -lc
- ld: Undefined symbol
- _MAIN_
-
- You might think that the "-u _MAIN_" above is a dead giveaway, but in
- fact it's still there when the -Bstatic is removed, but then I don't
- get the error.
-
- Any ideas?
-
- --
- This is news. This is your | Peter Scott, NASA/JPL/Caltech
- brain on news. Any questions? | (pjs@euclid.jpl.nasa.gov)
-
-
-