macos help

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


sorry, this is the exact error output. The other one wasn't linking
against libgmp.

# Error:  File ":gmp_test.o"
#         Reference to unresolved symbol ".__gmp_printf"
# Error:  File "::gmp-4.1.2:macos:libgmp.4.1.2"
#         Reference to unresolved symbol ".__gmp_tmp_mark"
# Error:  File "::gmp-4.1.2:macos:libgmp.4.1.2"
#         Reference to unresolved symbol ".__gmp_tmp_alloc"
# Error:  File "::gmp-4.1.2:macos:libgmp.4.1.2"
#         Reference to unresolved symbol ".__gmp_tmp_free"

regards,
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");}