This is the mail archive of the
fortran@gcc.gnu.org
mailing list for the GNU Fortran project.
Re: MPFR error
>
> Well, id libmpfr.a and libgmp.a actually available in directories
> you listed.
>
> PS: Please respond to the fortran@ list, so others can benefit from
> the discussion.
>
It may be not a problem with GMP & MPFR. libmpfr.a has all the references.
It seems a problem of "ld". For example,
If I link the program as
gcc -o test -I(something) test.c -L(something) -lmpfr -lgmp
I got an error message, undefied reference to
___gmpfr_default_fp_bit_precision@INDNTPOFF
I checked mpfr object files. The undefined reference, as mentioned above, is
in the file
set_dfl_prec.o, and the file is in the library libmpfr.a. I can see the
reference in the index table of libmpfr.a. The library "libmpfr.a" seems
correct. "ld" cannot find the reference in libmpfr.a.
If I link the object file, set_dfl_prec.o, to the program, e.g.,
gcc -o test -I(something) test.c -L(something) -lmpfr -lgmp set_dfl_prec.o
It works. Is it a "ld" problem? Or, how to solve it?
Thank you.