Help linking f77 libraries into gfortran
- From: "deltaseq0" <deltaseq0@xxxxxxxxxx>
- Date: Fri, 27 Jul 2007 15:26:06 -0400
I've recently installed gcc 4.2.1 on i686-pc-cygwin from source code. I've
been testing the gfortran compiler and ran across a problem linking f77
libraries. My Makefile is:
mingwlib = -L/cygdrive/c/Devel/MinGW/lib
CFLAGS = -O2 -malign-double -mtune=pentium4
CC = gfortran
librs = -lSLATEC \
-lPSPLOT
objects = TA1Main.o \
random.o \
TA1QPoutput.o \
TA1SelectPort.o \
TA1Neighbor.o \
TA1Calcqr.o \
TA1Threshold.o \
TA1Solver.o \
TA1PSplot.o
TA1 : $(objects)
$(CC) $(CFLAGS) $(objects) $(mingwlib) $(librs) -o TA1.exe
TA1Main.o : TA1Main.f
$(CC) $(CFLAGS) TA1Main.f -c
random.o : random.f
$(CC) $(CFLAGS) random.f -c
TA1QPoutput.o : TA1QPoutput.f
$(CC) $(CFLAGS) TA1QPoutput.f -c
TA1SelectPort.o : TA1SelectPort.f
$(CC) $(CFLAGS) TA1SelectPort.f -c
TA1Neighbor.o : TA1Neighbor.f
$(CC) $(CFLAGS) TA1Neighbor.f -c
TA1Calcqr.o : TA1Calcqr.f
$(CC) $(CFLAGS) TA1Calcqr.f -c
TA1Threshold.o : TA1Threshold.f
$(CC) $(CFLAGS) TA1Threshold.f -c
TA1Solver.o : TA1Solver.f
$(CC) $(CFLAGS) TA1Solver.f -c
TA1PSplot.o : TA1PSplot.f
$(CC) $(CFLAGS) TA1PSplot.f -c
..PHONY : clean
clean:
rm -rf $(objects) TA1.exe
This produces many errors similar to:
/cygdrive/c/Devel/MinGW/lib/libSLATEC.a(xersve.o):xersve.f:(.text+0x206):
undefined reference to `_s_copy'
The program compiles using g77 without problems. I'd like to know if it is
possible to use the SLATEC and PSPLOT as-is or do I need to recompile new
libraries to use in gfortran. (For the moment, I'd like to link to these
existing libraries if possible.) I've tried various gfortran switches and
macros but to no avail.
Thanks Mike
.
- Follow-Ups:
- Re: Help linking f77 libraries into gfortran
- From: deltaseq0
- Re: Help linking f77 libraries into gfortran
- From: Steven G. Kargl
- Re: Help linking f77 libraries into gfortran
- From: FX
- Re: Help linking f77 libraries into gfortran
- Prev by Date: Re: forall and do loop
- Next by Date: Re: Help linking f77 libraries into gfortran
- Previous by thread: making default arguments easier to use
- Next by thread: Re: Help linking f77 libraries into gfortran
- Index(es):
Relevant Pages
|