__gfortran_copy_string
Tim Prince
tprince@myrealbox.com
Mon Jun 25 03:51:00 GMT 2007
John Nelson wrote:
> I am trying to link a couple of simple c programs and a fortran
> wrapper (HBOOKwrap.F) with the CERN library.
>
> gfortran compile option: -ffixed-line-length-0
>
> Link line:
>
> gfortran -o Trg2ntp Trg2ntp.o getEv.o HBOOKwrap.o -L/cern/2005/lib
> -lpacklib
>
> and I get an error:
>
> /usr/bin/ld: Undefined symbols:
> __gfortran_copy_string
>
>
> Google on gfortran_copy_string shows that others have had problems
> with this and
> cannot find where this piece of code is located.
>
> gfortran was downloaded yesterday (23 June 2007) to MacOSX 10.4.10 on
> PowerPC G4.
>
> gcc is latest installation from XCode 2.4.1
>
> A hex dump of HBOOKwrap.o shows that gfortran_copy_string is not in
> its symbol table.
>
> A hex dump of /usr/local/gfortran/libgfortran3.dylib shows that it
> does not contain this symbol.
> It is not present in libgfortran.a either.
>
> I am missing something, or have an incorrect gfortran library, or ??
>
Your error message should have said where the undefined reference came
from. The Google references appear to refer to a disrecommended old
version of gfortran. Your reference to /cern/2005/ tends to reinforce
this suspicion, as there was no satisfactory gfortran that long ago.You
will probably not be able to use a library which was built with a
different major version of gfortran than the one you installed. More
helpful than claiming "latest version from XCode" would be to tell what
you get from gfortran -v. But, you probably could solve the problem by
rebuilding CERN libraries with the same version of gcc, if that is not
what you did.
More information about the Fortran
mailing list