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.

Leave a Reply

Your email address will not be published. Required fields are marked *


This site uses Akismet to reduce spam. Learn how your comment data is processed.