Re: Help linking f77 libraries into gfortran



In article <iFrqi.24$u04.6@xxxxxxxxxxxx>,
"deltaseq0" <deltaseq0@xxxxxxxxxx> writes:


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
^^^^^^^^^^^^^
You may want to remove this option (unless you
compiled libgfortran.a with it).

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.

You'll probably need to use the -ff2c option and add -lg2c to
your library list.

Recompiling SLATEC and PSPLOT with gfortran would make your life
easier in the long run.

--
Steve
http://troutmask.apl.washington.edu/~kargl/
.



Relevant Pages

  • Re: problem of building stardict
    ... checking for gcc... ... checking for C compiler default output file name... ... checking how to recognize dependent libraries... ... checking for gfortran... ...
    (Fedora)
  • problem of building stardict
    ... checking for gcc... ... checking for C compiler default output file name... ... checking how to recognize dependent libraries... ... checking for gfortran... ...
    (Fedora)
  • Re: g95 versus gfortran
    ... My primary compiler is gfortran instead of g95. ... I want is some compiler that just works without any fiddling. ... Debian Linux includes all these libraries by default. ...
    (comp.lang.fortran)
  • Help linking f77 libraries into gfortran
    ... been testing the gfortran compiler and ran across a problem linking f77 ... libraries to use in gfortran. ...
    (comp.lang.fortran)
  • Re: gfortran binaries from 64 to 32 bit
    ... have compiled using gfortran. ... using parallel compiler mpich 1.2.6. ... change path name because it had problems to find the libraries. ... cp: impossibile fare stat di `hybflow': No such file or directory ...
    (comp.lang.fortran)