<html><head><style type="text/css"><!-- DIV {margin:0px;} --></style></head><body><div style="font-family:times new roman, new york, times, serif;font-size:12pt">In my first "hello world" type program, the one identical to that on page 75, g++ produces the following error:<br><br>bevans@revanslinux /home/bevans/gmp-4.2.3/bob> g++ Test1.cc -lgmpxx -lgmp<br>/home/bevans/gmp-4.2.3/include/gmpxx.h: In destructor ˇ__gmp_alloc_cstring::~__gmp_alloc_cstring()˘:<br>/home/bevans/gmp-4.2.3/include/gmpxx.h:1367: error: ˇmp_get_memory_functions˘ was not declared in this scope<br><br>I see the declaration of mp_get_memory_functions in gmp.xx, so am not sure what is wrong.<br><br>Source:<br>#include </home/bevans/gmp-4.2.3/include/gmpxx.h><br>#include <iostream><br>using namespace std;<br>int main(void)<br> {<br> mpz_class a,b,c;<br> a = 1234;<br> b =
"-5678";<br> c = a+b;<br> cout << "sum is " << c << endl;<br> cout << "absolute value is " << abs(c) << endl;<br> return 0;<br> }<br><br>GMP version 4.2.3<br>Only configuration option was --prefix<br><br>bevans@revanslinux /home/bevans/gmp-4.2.3/bob> g++ --version<br>g++ (GCC) 4.1.1 20070105 (Red Hat 4.1.1-51)<br><br>bevans@revanslinux /home/bevans/gmp-4.2.3/bob> uname -a<br>Linux revanslinux 2.6.19-1.2895.fc6 #1 SMP Wed Jan 10 19:28:18 EST 2007 i686 GNU/Linux<br><br>bevans@revanslinux /home/bevans/gmp-4.2.3> ./config.guess<br>pentium4-pc-linux-gnu<br>bevans@revanslinux /home/bevans/gmp-4.2.3> ./configfsf.guess<br>i686-pc-linux-gnu<br><br>Thanks, Bob<br><br></div><br>
</body></html>