MPFR problems

Chris Saunders chris.saunders@sympatico.ca
Mon, 7 Jul 2003 14:45:29 -0400


I have built the GMP library using MinGW using:

       ./configure --enable-alloca=no --enable-mpfr

My situation is that I am writing an interface to GMP using the
language Eiffel.  My Eiffel compiler builds C code and uses
Microsoft Visual C++ 6.0 as the back end C compiler.
My platform is Windows 2000.

All of GMP works fine but when I try to build the interfaces to
certain MPFR functions I get the following error message:

libmpfr.a(get_d.o) : error LNK2019: unresolved external symbol __imp___HUGE
referenced in function _mpfr_get_d3

gmp.exe : fatal error LNK1120: 1 unresolved externals

NMAKE : fatal error U1077: 'link' : return code '0x460'
Stop.

Note:

The function "mpfr_get_d3" is defined in "get_d.c". This function
uses both "MPFR_DBL_INFP" and "MPFR_DBL_INFM".

These macros are defined in "mpfr-math.h". They are defined as
"HUGE_VAL" and "(-HUGE_VAL)" respectively.

I have found 4 library files that contain the text "__imp___HUGE":
    libcrtdll.a, libmsvcrt.a, libmsvcrt20.a and libmsvcrt40.a
If I add any of these libraries to my project the compiler complains
about multiply defined symbols.

I am hoping to find some help in overcoming this problem.

Regards
Chris Saunders
chris.saunders@sympatico.ca