Reputation: 596
Can somebody let me know the process of building the gnuMP Libraries on Windows. I required a DLL of gnuMP Library but the build system does't allow me to create the dll library for windows OS. I have tried to build using the MinGW and Cygwin but dll is not created.
Upvotes: 2
Views: 217
Reputation: 738
I have faced the same issue. But I have managed to Build dll of GnuMP library on Windows
On windows systems ‘--cygwin*’, ‘--mingw*’ and ‘--pw32*’ by default GMP builds only a static library, but a DLL can be built instead using
./configure --disable-static --enable-shared
Static and DLL libraries can't both be built, since certain export directives in gmp.h must be different. A MINGW DLL build of GMP can be used with Microsoft C. Libtool doesn't install a .lib format import library, but it can be created with MS lib as follows, and copied to the install directory. Similarly for libmp and libgmpxx.
cd .libs
lib /def:libgmp-3.dll.def /out:libgmp-3.lib
MINGW uses the C runtime library ‘msvcrt.dll’ for I/O, so applications wanting to use the GMP I/O routines must be compiled with ‘cl /MD’ to do the same. If one of the other C runtime library choices provided by MS C is desired then the suggestion is to use the GMP string functions and confine I/O to the application.
Upvotes: 3