This is the mail archive of the fortran@gcc.gnu.org mailing list for the GNU Fortran project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: gfortran linker errors


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



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]