problems linking program using GNU Fortran (GCC) 4.4.0 20080820 (experimental) [trunk revision 139256]
Tobias Burnus
burnus@net-b.de
Thu Aug 21 19:01:00 GMT 2008
Hallo Matthias,
Matthias Laubenstein wrote:
> GNU Fortran (GCC) 4.1.2 20070626 (Red Hat 4.1.2-14)
> GNU Fortran (GCC) 4.4.0 20080820 (experimental) [trunk revision 139256]
>
> main.f:(.text+0x11): undefined reference to `_gfortran_set_options'
> /home/fx/gfortran_nightbuild/trunk/libgfortran/fmain.c:13: undefine
>
>
Somehow an old version of gfortran is being linked both symbols
_gfortran_set_options and ... are part of libgfortran.so.3 (GCC 4.3/4.4)
but not of .1 (GCC 4.0/4.1) and .2 (GCC 4.2). Usually, gfortran should
link the right version (if invoked as "gfortran fortran.f90 object.o
...") - then it only should fail at run time if the libarary is not in
the path (unless statically linked [-static-libgfortran];
LD_LIBRARY_PATH= is an option if it does not work with the default
settings).
However, I do not see where it goes wrong. If you invoke gfortran with
the "-v" option, it shows the exact linking command, maybe it tells you
why the 4.1 library (libgfortran.so.{1,2}) is used instead of the 4.4
library (libgfortran.so.3).
Tobias
More information about the Fortran
mailing list