GMP Module (perl)
Thu, 24 Jul 2003 11:58:29 +1000
----- Original Message -----
From: "Kevin Ryde" <firstname.lastname@example.org>
To: "Sisyphus" <email@example.com>
Cc: "GMP" <firstname.lastname@example.org>
Sent: Thursday, July 24, 2003 11:25 AM
Subject: Re: GMP Module (perl)
> "Sisyphus" <email@example.com> writes:
> > GMP.xs: In function `XS_GMP__Mpz_overload_add':
> > GMP.xs:1229: initializer element is not constant
> > GMP.xs:1229: (near initialization for `table.op')
> Hmm, yep, DLL imported functions don't work in initializers. It'd be
> nice if gcc could do something to help that, since of course it's a
> fairly general problem.
Faik, they may have. The version of gcc that I'm using is getting a bit old.
I'll check with the gcc mailing list to see if more recent versions address
> You might get more joy from a static build of gmp, or maybe it'd work
> to compile the generated GMP.c as C++ instead of C.
The second option sounds like one that should be fairly trivial to
implement. I don't know how to do that (off the top of my head) in a perl
build, but I should be able to work that out without too much difficulty.
I could, of course, simply use the msvc-built binaries with my gcc-built
perl. My reason for not doing so is that my (standard edition) msvc++ 6.0
does not perform optimisation. I'm not so sure that's a *valid* reason. The
GMP dll *was* built with an optimising compiler and, faik, it may well be
insignificant whether the actual perl module is built with an optimising
compiler or not. (If you have any views on that aspect I'd be interested to