This is the mail archive of the
fortran@gcc.gnu.org
mailing list for the GNU Fortran project.
Re: gfortran linker errors
- From: Evan Cooch <cooch17 at verizon dot net>
- To: cooch17 at verizon dot net
- Cc: fortran at gcc dot gnu dot org
- Date: Sun, 16 Dec 2007 20:31:44 -0500
- Subject: Re: gfortran linker errors
- References: <476599F9.2020109@verizon.net>
- Reply-to: cooch17 at verizon dot net
Solved -turns out I needed to run a clean first, and then recompile
everything. Thought I'd tried that, but apparently not.
Evan Cooch wrote:
Greetings -
Apologies for cross-posting this to the fortran list ass well as
gcc-help - never quite sure where to submit some fortran queries -
this isn't language-specific, so perhaps only gc-help, but, at the
risk of being flamed. ;-)
I have a very large application that I have compiled/linked
successfully on a Linux box running Fedora 5. Recent upgrade to Fedora
7. Runs gcc 4.1.2-27. The compilation of individual functions/routines
in the makefile works perfectly (as it did before). But, what doesn't
work anymore is the linking. Here is the basic structure of the makefile:
COMPILER = gfortran
LINKER = gfortran
COPTIONS = -c -fimplicit-none -fbounds-check -march=nocona
-funroll-loops -O3
OBJECTS = mark.o btest.o cvtcas.o headng.o \
error.o fillsg.o forset.o getcmd.o oindex.o \
ibclr.o ibset.o ivalue.o linchk.o mindex. etc. etc.
mark.exe: mark.f $(OBJECTS) MODELC STATUS
$(LINKER) $(OBJECTS) -o mark.exe -L/home/egc/Desktop/mark -lLinpack
hyperdist.mod: hyperdist.f
$(COMPILER) $(COPTIONS) hyperdist.f
mark.o: mark.f HEADST MODELC STATUS
$(COMPILER) $(COPTIONS) mark.f
multistrata.mod: multistrata.f
$(COMPILER) $(COPTIONS) multistrata.f
<etc...etc...etc>
As noted, the compilation of the individual routines goes fine, but
thinks go to heck at the link step. I get lots (hundreds) of the
following sorts of errors:
hyperread.f:(.text+0x3091): undefined reference to
`__hyperdist__nhypdesignpars'
hyperread.f:(.text+0x3179): undefined reference to `__hyperdist__nvcsize'
hyperread.f:(.text+0x31a6): undefined reference to `__hyperdist__nvcsize'
hyperread.f:(.text+0x31d3): undefined reference to `__hyperdist__nvcsize'
etc...etc...etc
In other words, hundreds of 'undefined reference' errors, which I've
never seen before (perhaps lucky me, but...).
Suggestions? Pointers to the obvious?
Much thanks in advance...