Re: Help linking f77 libraries into gfortran
- From: "deltaseq0" <deltaseq0@xxxxxxxxxx>
- Date: Fri, 27 Jul 2007 15:50:19 -0400
"FX" <coudert@xxxxxxxxxxxxx> wrote in message
news:f8dh40$1ht6$1@xxxxxxxxxxxxx
This produces many errors similar to:
/cygdrive/c/Devel/MinGW/lib/libSLATEC.a(xersve.o):xersve.f:(.text+0x206):
undefined reference to `_s_copy'
If you're linking to a static library (like your libSLATEC.a) you need to
also link in the libraries that it depends on: in your case, I think
you'd need to add a libg2c.a library to your linker command.
--
FX
Thanks FX
Maybe getting closer. When I tried -lg2c I got:
$ gfortran -O2 -malign-double -mtune=pentium4 TA1Main.o random.o
TA1QPoutput.o TA1SelectPort.o TA1Neighbor.o TA1Calcqr.o TA1Threshold.o
TA1Solver.o
TA1PSplot.o -L/cygdrive/c/Devel/MinGW/lib -lSLATEC -lPSPLOT -lg2c -o
TA1.exe
/cygdrive/c/Devel/MinGW/lib/libg2c.a(iio.o):iio.c:(.text+0x4c): undefined
reference to `__errno'
but not errors referring to SLATEC or PSPLOT. Maybe libg2c has dependents I
need to also add? Any way to look inside these libraries to determine
dependencies?
Mike
.
- Follow-Ups:
- References:
- Help linking f77 libraries into gfortran
- From: deltaseq0
- Re: Help linking f77 libraries into gfortran
- From: FX
- Help linking f77 libraries into gfortran
- Prev by Date: Re: Help linking f77 libraries into gfortran
- Next by Date: Re: Help linking f77 libraries into gfortran
- Previous by thread: Re: Help linking f77 libraries into gfortran
- Next by thread: Re: Help linking f77 libraries into gfortran
- Index(es):
Relevant Pages
|