<div dir="ltr"><br>Thank you!<br><br><div class="gmail_quote">On Thu, Oct 2, 2008 at 9:52 PM, Matt McCutchen <span dir="ltr"><<a href="mailto:matt@mattmccutchen.net">matt@mattmccutchen.net</a>></span> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
On Wed, 2008-10-01 at 00:21 -0500, Jeanna Matthews wrote:<br>
> I downloaded the package, but am having trouble compiling it with g++<br>
> on Linux.<br>
><br>
> It appears not to recognize the <X> in this:<br>
><br>
> template <class X><br>
> inline X convertBigUnsignedToPrimitiveAccess(const BigUnsigned &a) {<br>
>         return a.convertToPrimitive<X>();<br>
> }<br>
<br>
> [bigint-2008.07.20]$ make<br>
> g++ -c -O2 -Wall -pedantic BigInteger.cc<br>
> BigInteger.cc: In function `X<br>
> convertBigUnsignedToPrimitiveAccess(const<br>
>    BigUnsigned&)':<br>
> BigInteger.cc:89: syntax error before `>' token<br>
> make: *** [BigInteger.o] Error 1<br>
> [jnm@polaris bigint-2008.07.20]$ g++ -v<br>
> Reading specs from /usr/lib/gcc-lib/i386-redhat-linux/3.2.3/specs<br>
> Configured with: ../configure --prefix=/usr --mandir=/usr/share/man<br>
> --infodir=/usr/share/info --enable-shared --enable-threads=posix<br>
> --disable-checking --with-system-zlib --enable-__cxa_atexit<br>
> --host=i386-redhat-linux<br>
> Thread model: posix<br>
> gcc version 3.2.3 20030502 (Red Hat Linux 3.2.3-59)<br>
<br>
Your g++ seems to dislike my use of explicit template arguments, but I'm<br>
surprised it didn't complain about the <X> in BigUnsigned.hh.  Consider<br>
upgrading g++.  I can compile the library just fine with g++ 4.3.0 and<br>
with g++ <a href="http://3.4.6." target="_blank">3.4.6.</a>  Alternatively, you could apply the attached patch,<br>
which removes the explicit template arguments.  (The patched version is<br>
also in branch "no-explicit-template-args" of my repository.)<br>
<font color="#888888"><br>
Matt<br>
</font></blockquote></div><br></div>