compiling the billions of Pi digits.c file

Brian Gladman brg at
Mon Jul 17 10:49:42 CEST 2006

Sisyphus wrote:

> ----- Original Message ----- 
> From: "glassy" <glassymeow at>
>> how to compile and build the file "gmp-chudnovsky.c"
>> in the
>> i am not a programmer, just a user, i hope someone could give a detailed
> insructions.
>> i have failed in compiling the file using VC++ v6.0 under winows xp
> It builds ok with the MinGW (native windows) port of the gcc compiler on
> Win32, but when I try to build with VC7.0, I get the following
> warnings/errors during compilation:
> I think these errors all stem from the fact that VC7.0 (and, I assume,
> VC6.0) expect a '(' to follow 'inline'. I don't know, offhand, how to
> rewrite that code in such a way that Microsoft compilers will find it
> acceptable ... and it's something that's off-topic for this list. Perhaps
> some kind soul who knows the answer will tell you anyway :-)
> Otherwise you could ask for advice on how to handle this situation at (eg)
> the newsgroup where (I think) such
> questions *are* on topic.
> If the error you get is significantly different to the above, then it might
> be best to let us know just what the error is.

The only change I needed to make to gmp-chudnovsky.c to use it with my
native VC++ port of GMP was to add:

#ifdef _MSC_VER
#define inline __inline

after the included header files to overcome the use of a 'inline' which,
I think, is non standard in C prior to C99.

   Brian Gladman

More information about the gmp-discuss mailing list