bug-gmp
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Problem With C++ Wrapper For Integers


From: Jim Leary
Subject: Problem With C++ Wrapper For Integers
Date: Thu, 03 Jan 2002 16:02:26 -0800

The GMP home page now has under "Status of the current release"
the statement

"gmpxx.h needs the #include <strstream.h> uncommented."
Even with that fix, there still seems to be a basic
problem with this software.

The trivial program

#include "gmpxx.h"

int main (void)
{
        return 0;
}

compiles correctly but if one more statement is added
compiler error happen. The extra line is the declaration
of a gpm type of multiple precision integer


#include "gmpxx.h"

int main (void)
{
        mpz_class a;
        return 0;
}

The reported compiler errors follow:

bash$ g++ test_gmpxx.cpp
/tmp/ccdbudnP.o: In function `__gmp_expr<__gmpz_value,
__gmpz_value>::~__gmp_expr(void)':
/tmp/ccdbudnP.o(.gnu.linkonce.t._._t10__gmp_expr2Z12__gmpz_valueZ12__gmpz_value+0xd):
undefined reference to `__gmpz_clear'
/tmp/ccdbudnP.o: In function `__gmp_expr<__gmpz_value,
__gmpz_value>::__gmp_expr(int)':
/tmp/ccdbudnP.o(.__gmp_expr<__gmpz_value, __gmpz_value>::gnu.linkonce.t.(int)
+0xe): undefined reference to `__gmpz_init_set_si'
collect2: ld returned 1 exit status


The specs on my compiler and system are in my first bug report
about the need for uncommenting #include <strstream.h>. I
believe my system specs are irrelevent

Thanks  Jim Leary






reply via email to

[Prev in Thread] Current Thread [Next in Thread]