macos help

Rolando Abarca (aka funkaster) rabarca@ing.uchile.cl
Sun, 16 Feb 2003 16:53:55 -0300 (CLST)


Hi, I'm new to gmp and I'm having some problems. I've compiled the gmp
library with no problems using MPW (as indicated in the macos folder).
I'm using CodeWarrior Pro 7.1 for my main projects, so I tried to compile
something simple to test the library. I used the isprime.c but apparently
something went wrong, because the compiled claimed that some simbols
where unresolved (like gmp_printf and others). I tried to compile the same
file with MPW, with the exactly same results:

# Error:  File ":gmp_test.o"
#         Reference to unresolved symbol ".__gmpz_init"
# Error:  File ":gmp_test.o"
#         Reference to unresolved symbol ".__gmpz_set_str"
# Error:  File ":gmp_test.o"
#         Reference to unresolved symbol ".__gmpz_probab_prime_p"
# Error:  File ":gmp_test.o"
#         Reference to unresolved symbol ".__gmp_printf"

I'm sure I'm linking against libgmp, so I think the problem is elsewhere
(maybe in the linking process of the library). Can anyone please enlighten
me?
thanks for any help.
ra.-

#include <stdio.h> /*  square root by Newton's zero-finder method   */
#include <float.h> /*  by Rolando Abarca  rabarca at ing.uchile.cl  */
int main(int c, char* v[]){if (c==2){long d=atol(v[1]);double r1,r2=0;
double E=DBL_MIN;for(r1=(1+d)/2;((r1-r2>0)?r1-r2:r2-r1)>E;){r2=r1;r1=(
r2+d/r2)/2;}printf("%.15f\n",r1);}else printf(" usage: fsqrt <n>\n");}