Monthly Archives: November 2007

Universal binary of netcdf library for Mac OS X (10.5)

In order to create a universal binary of netcdf first read this post. Than issue this configure command:

./configure CFLAGS="-isysroot /Developer/SDKs/MacOSX10.4u.sdk -arch ppc -arch i386" CXXFLAGS="-isysroot /Developer/SDKs/MacOSX10.4u.sdk -arch ppc -arch i386" LDFLAGS="-Wl,-syslibroot,/Developer/SDKs/MacOSX10.4u.sdk -arch ppc -arch i386" --disable-dependency-tracking --disable-f77c 

This will correctly build a universal binary of the netcdf library (C and C++). I had to use “–disable-f77” since I only had f2c installed which is not able to compile the netcdf fortran API. “make test” was successfully run.

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

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.

Where is the damn \ and { in Mac OS X?

I recently got a new shiny iMac at work with Mac OS X 10.5 on it. Very nice. I like it. If you are used to the Windows/Linux keyboard, you run into troubles though, since some keys are not there where they should be. In order to find out where the are use the virtual keyboard. This utility is somehow hidden, but here are the instructions how to enable it: Continue reading Where is the damn \ and { in Mac OS X?