<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#993399">
Sisyphus wrote:
<blockquote cite="mid:F5CC083CF90A4E53AC48F675944B10B3@desktop2"
type="cite"><br>
----- Original Message ----- From: "Duke Hound"
<a class="moz-txt-link-rfc2396E" href="mailto:dukethek9@gmail.com"><dukethek9@gmail.com></a>
<br>
.
<br>
.
<br>
<blockquote type="cite"><br>
Below is the output from trying to compile the test code within msys.
<br>
<br>
$ g++ -o mytest.exe test.cpp -I/usr/local/include -L/usr/local/lib
-lgmpxx
<br>
C:/DOCUME~1/dan/LOCALS~1/Temp/cc37G8yA.o:test.cpp:(.text$_ZN10__gmp_exprIA1_12__mpz_structS1_ED1Ev[__gmp_expr<__mpz_struct
<br>
[1], __mpz_struct [1]>::~__gmp_expr()]+0xd): undefined reference to
<br>
`___gmpz_clear'
<br>
C:/DOCUME~1/dan/LOCALS~1/Temp/cc37G8yA.o:test.cpp:(.text$_ZN10__gmp_exprIA1_12__pz_structS1_EaSEi[__gmp_expr<__mpz_struct
<br>
[1], __mpz_struct [1]>::operator=(int)]+0x14): undefined reference
to
<br>
`___gmpz_set_si'
<br>
C:/DOCUME~1/dan/LOCALS~1/Temp/cc37G8yA.o:test.cpp:(.text$_ZN10__gmp_exprIA1_12__mpz_structS1_EC1Ev[__gmp_expr<__mpz_struct
<br>
[1], __mpz_struct [1]>::__gmp_expr()]+0xd): undefined reference to
<br>
`___gmpz_init'
<br>
C:/msys/1.0/local/lib/libgmpxx.a(osmpz.o):osmpz.cc:(.text+0x39):
<br>
undefined reference to `___gmpz_get_str'
<br>
C:/msys/1.0/local/lib/libgmpxx.a(osdoprnti.o):osdoprnti.cc:(.text+0x65):
<br>
undefined reference to `___gmp_allocate_func'
<br>
C:/msys/1.0/local/lib/libgmpxx.a(osdoprnti.o):osdoprnti.cc:(.text+0x9d):
<br>
undefined reference to `___gmp_doprnt_integer'
<br>
C:/msys/1.0/local/lib/libgmpxx.a(osdoprnti.o):osdoprnti.cc:(.text+0xa9):
<br>
undefined reference to `___gmp_asprintf_final'
<br>
C:/msys/1.0/local/lib/libgmpxx.a(osdoprnti.o):osdoprnti.cc:(.text+0xcd):
<br>
undefined reference to `___gmp_free_func'
<br>
C:/msys/1.0/local/lib/libgmpxx.a(osdoprnti.o):osdoprnti.cc:(.text+0x125):
<br>
undefined reference to `___gmp_free_func'
<br>
C:/msys/1.0/local/lib/libgmpxx.a(osdoprnti.o):osdoprnti.cc:(.text+0x164):
<br>
undefined reference to `___gmp_free_func'
<br>
C:/msys/1.0/local/lib/libgmpxx.a(osfuns.o):osfuns.cc:(.rdata+0x4):
<br>
undefined reference to `___gmp_asprintf_memory'
<br>
C:/msys/1.0/local/lib/libgmpxx.a(osfuns.o):osfuns.cc:(.rdata+0x8):
<br>
undefined reference to `___gmp_asprintf_reps'
<br>
collect2: ld returned 1 exit status
<br>
<br>
</blockquote>
<br>
Yes, I get the same, though the app builds and runs perfectly if I
build it with:
<br>
<br>
$ g++ -o mytest.exe test.cpp -I/usr/local/include -L/usr/local/lib
-lgmpxx -lgmp
<br>
<br>
I don't do any cpp stuff, and I didn't think it should be necessary to
link to libgmp.a as well as libgmpxx.a. (I guess I was wrong about
that, too, but I really don't know.)
<br>
<br>
Cheers,
<br>
Rob <br>
</blockquote>
<font face="Palatino Linotype">Thank you, thank you, thank you!<br>
In codeblocks i had the libgmp.a library before the libgmpxx.a
library. Didn't think this order would be an issue, but gmpxx does
wrap and link to the gmp, so it is not unreasonable.<br>
<br>
Thanks so much rob! BTW, I saw your name on a few other posts
throughout the internet...as i've been searching for the solution. I
really appreciate you taking the time to help us peons out ;)<br>
<br>
Thanks,<br>
Long live GNU!<br>
</font>
</body>
</html>