MacOS X linking problem

Torbjorn Granlund tege at swox.com
Fri Nov 10 16:28:28 CET 2006


Claude Dion <claude.dion at tp.umu.se> writes:

  	I have a problem linking with the gmp libraries, even though
  make  check returns no error.  I get
  
  % gcc  -o arbitrary arbitrary.c -lgmp -lm
  /usr/bin/ld: /usr/local/lib/libgmp.dylib bad magic number (not a Mach-
  O file)
  collect2: ld returned 1 exit status
  
  or, with --disable-shared:
  
  % gcc  -o arbitrary arbitrary.c -lgmp -lm
  /usr/bin/ld: truncated or malformed archive: /usr/local/lib/libgmp.a
  (ranlib structures in table of contents extends past the end of the
  table of contents, can't load from it)
  collect2: ld returned 1 exit status
  
Pass -m64, if the library was conpiled for ABI=mode64.
(The manual in 4.2.1 wasn't clear about this.)

-- 
Torbjörn


More information about the gmp-bugs mailing list