Hello,
I've tried to use the GMP library for a small program in XCode.
Therefore I have downloaded and installed in fink the GMP package.
Then I created a small program with XCode, including the /sw/include/
gmp.h file.
And it compiles fine.
Finally I added the libgmp.a file in "Link Binary With Library" in the
"Target" part of
the "groups and file" panel.
But during linking I get the following messages :
ld: warning in /sw/lib/libgmp.dylib, file is not of required
architecture
"___gmpz_init", referenced from:
_main in main.o
"___gmp_printf", referenced from:
_main in main.o
ld: symbol(s) not found
Why the linker does'nt find the symbols ?
Many thanks in advance for your help !
Vincent
here is the program :
#include <stdio.h>
#include <gmp.h>
int main (int argc, const char * argv[]) {
mpz_t Result, A, B;
mpz_init (Result);
//mpz_init_set_str (A, "12345678910111213141516", 10);
//mpz_init_set_str (B, "10000000000000000000000", 10);
//mpz_add (Result, A, B);
gmp_printf ("%Zd\n", Result);
return 0;
}
AM
------------------------------------------------------------------------------
SF.Net email is Sponsored by MIX09, March 18-20, 2009 in Las Vegas, Nevada.
The future of the web can't happen without you. Join us at MIX09 to help
pave the way to the Next Web now. Learn more and register at
http://ad.doubleclick.net/clk;208669438;13503038;i?http://2009.visitmix.com/
_______________________________________________
Fink-beginners mailing list
[email protected]
http://news.gmane.org/gmane.os.apple.fink.beginners