Vincent DIEMUNSCH wrote:
[]
> Finally I added the libgmp.a file in "Link Binary With Library" in the 
> "Target" part of
> the "groups and file" panel.

It seems it didn't understand that you want the static lib, it tries to 
use libgmp.dylib. But this is not the cause of your error.
> 
> 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 ?

It doesn't find them, because it does not link with the library, because 
it finds that it "is not of required architecture". Are you perhaps 
trying to build a universal binary? Or a 64bit binary using the 32bit 
libgmp.dylib?

Fink's dylibs are built for one architecture only. With the gmp package, 
you get the 32bit dylib /sw/lib/libgmp.dylib, and with the gmp-64bit 
package, you get the 64bit /sw/lib/x86_64/libgmp.dylib, both for the 
machine type (ppc or intel) you are compiling on:

costabel% file /sw/lib/libgmp.3.dylib /sw/lib/x86_64/libgmp.3.dylib
/sw/lib/libgmp.3.dylib:        Mach-O dynamically linked shared library i386
/sw/lib/x86_64/libgmp.3.dylib: Mach-O 64-bit dynamically linked shared 
library x86_64

You have to build an executable of the same architecture.

-- 
Martin

------------------------------------------------------------------------------
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

Reply via email to