What's odd is that this certified UNIX platform doesn't do what IBM AIX allows, ie to compile the netCDF library as x86_64.
Did you mean to say that AIX generates x86_64 code, or that AIX compiles a 64 bit application by default? I was under the impression that AIX only runs on the IBM Power chip set (not counting any emulators that may or may not exist for the Power series of chips).
1st) you do not need the Mac OS X 64bit kernel to run a 64bit application. Unless you have something like 32GB of real physical memory, the 32 bit Mac OS X kernel will do the job. Running a 64bit Mac OS X kernel is just a "Red Herring", with respect to your question.
2nd) you need to tell the compiler to generate a 64 bit application. Because Mac OS X (32 or 64 bit kernels) can and do run both 32 and 64 bit applications concurrently, and because there are still some 32 bit only Macs on the supported list, the compilers most likely default to the safest build model.
I'm willing to bet that AIX also defaults to the safest compile options so the resulting program will run on any of the currently supported IBM Power line of RISC processors. If you want to optimize for a specific Power system, you most likely have to add compiler options.
Anyway, you most likely need to add something like
gcc -arch x86_64
# -OR-
gcc -m64
And just adding these compiler options may or may not allow your library to work, as porting code to a new platform or from 32 bits to 64 bits on any platform is not always as easy as changing a few command line switches. Been there, done that, still getting paid to do it. So it would be good if the package you are using has already been ported to Mac OS X 64 bit, and you just need to throw a ./configure switch.
I have to deal with AIX, Solaris, Linux, and Windows at work (who knows what they will throw at us next week; I hope it isn't HP-UX 😟 ). When you are writing portable code you quickly learn that each and every Operating System vendor (even those that are branded UNIX(tm)) have their own annoying qualities. You don't even want to see our Makefiles and all the crazy different compiler options we have to have for each different OS. And if the OS has a separate 32 bit vs 64 bit kernel (Linux and Windows) it just adds to the complexity.
Message was edited by: BobHarris