Compiling universal binaries in Mac OSX 10.5 (Leopard) against 10.4u SDK problem

Posted November 30th @ 9:49 by Werner

The hint below is actually a hack. The correct solution would be to add “-mmacosx-version-min=10.4″ to the compiler and linker command as mentioned in this post or follow the comment below this post.

If you compile a programm/library on Mac OS X 10.5 (Leopard) against the 10.4u SDK as suggested in this technote to create a universal binary you may encounter this error message:

ld: library not found for -lcrt1.10.5.o

In that case you need to create a symbolic link

sudo ln -s /Developer/SDKs/MacOSX10.4u.sdk/usr/lib/crt1.o /Developer/SDKs/MacOSX10.4u.sdk/usr/lib/crt1.10.5.o

This might solve the linking problem than. This hint was found here and here.

1 Trackbacks/Pingbacks

  1. Pingback: Universal binary of netcdf library for Mac OS X (10.5) — Miscellaneous Debris on November 30, 2007

1 Comments

  1. Jon
    March 18, 2008 at 00:19

    set an environment variable that gcc/ld can see (in your makefile is recommended) that matches the SDK isysroot you have selected:

    MACOSX_DEPLOYMENT_TARGET=10.4
    export MACOSX_DEPLOYMENT_TARGET

Leave a comment

OpenID Login

Standard Login

 

Options:

Size

Colors