Re: Help linking f77 libraries into gfortran




"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



.



Relevant Pages

  • Re: How to identify required libraries
    ... trouble identifying what libraries I need to link against. ... ++.a lib would work but I received a stream of errors. ... : undefined reference to `strlen' ... An example would be writing an app that uses sockets and threading. ...
    (comp.os.linux.development.apps)
  • Re: How to identify required libraries
    ... trouble identifying what libraries I need to link against. ... ++.a lib would work but I received a stream of errors. ... : undefined reference to `strlen' ... An example would be writing an app that uses sockets and threading. ...
    (comp.os.linux.development.apps)
  • Re: How to identify required libraries
    ... trouble identifying what libraries I need to link against. ... : undefined reference to `strlen' ... An example would be writing an app that uses sockets and threading. ... me everything that was "sucked in" to compile and link. ...
    (comp.os.linux.development.apps)
  • Re: How to identify required libraries
    ... trouble identifying what libraries I need to link against. ... : undefined reference to `strlen' ... Please do not use ld directly, use the C/C++ compiler driver instead, ... tauno voipio iki fi ...
    (comp.os.linux.development.apps)
  • How to identify required libraries
    ... trouble identifying what libraries I need to link against. ... : undefined reference to `strlen' ... : undefined reference to `malloc' ... An example would be writing an app that uses sockets and threading. ...
    (comp.os.linux.development.apps)