major linker errors | gcc (gfortran)

Evan Cooch cooch17@verizon.net
Sun Dec 16 21:33:00 GMT 2007


Greetings -

Apologies if this should go to the fortran list, but as its not really a 
gfortran issue, I'm hoping/guessing this is the most appropriate spot to 
pursue this.

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...



More information about the Gcc-help mailing list