compile GMP for Visual C++?

Jacek Blaszczynski jacek.blaszczynski at acn.waw.pl
Tue Jul 6 10:46:55 CEST 2004


Hello!

Thanks for help, but error was caused by another still similar reason.
gmpdll project was using wrong config.h file from root of gmp-4.1.3 and not
from msvc directory.
The latter was supplied by your diff package and is correct from VS.NET
perspective ;).
Changing this removed that group of errors but another one appeared 

Compiling...
version.c
e:\Libraries and Components\GNU MP\gmp-4.1.3\gmp-impl.h(581) : fatal error
C1017: invalid integer constant expression

looking into code reveals that it could be again some define/undefine
problem.

Any ideas?

Cheers

Jacek


PS.

Perhpas I owe some short explanation for direction of my work:

I do plan to write .NET and Mono wrapper for GMP and if possible for NTL
libraries. Result of my work should provide GMP/NTL extensions to C#,
VB.NET, J# and dozens of other available languages for .NET/Mono platforms.
The plan is to release it under GPL/LGPL - obviously if project succeeds.

Availability of GMP and NTL ports (independant of cygwin and mingw) for
Win32 or Win64 would be very helpful in extending usability of the wrapper
to that platforms. The goel would be to have out of the box compilation of
GMP/NTL port on any Win32 platform with standard SDK tools or VS.

Unfortunately I am not c or asm genious so I have high respect for large by
line number count and mostly unknown to me internals of GMP and I am
hesitant to change code on myself.




 

-----Original Message-----
From: Brian Gladman [mailto:brg at gladman.plus.com] 
Sent: Tuesday, July 06, 2004 1:37 AM
To: Jacek Blaszczynski; gmp-discuss at swox.com
Subject: Re: compile GMP for Visual C++?

Jacek Blaszczynski wrote:

> Hello!
> 
> I tried to compile gmp-4.1.3 using projects from
> 
> http://fp.gladman.plus.com/computing/gmp4win.htm_
> 
> Unfortunately, there are multiple compile errors in gmp-impl.h file, 
> which was supposed to be replaced by zipped package, but was not.

I don't replace this file (as far as I recall).

> Any ideas how to fix it?

[snip details]

The HAVE_ATTRIBUTE_XX definition lines in config.h should be:

#undef HAVE_ATTRIBUTE_CONST
#undef HAVE_ATTRIBUTE_MALLOC
#undef HAVE_ATTRIBUTE_MODE
#undef HAVE_ATTRIBUTE_NORETURN

but it seems that they are defined in your config.h file or maybe elsehwere.
Fixing this should overcoem the problem.

     Brian Gladman





More information about the gmp-discuss mailing list