This archive contains answers to questions sent to Unidata support through mid-2025. Note that the archive is no longer being updated. We provide the archive for reference; many of the answers presented here remain technically correct, even if somewhat outdated. For the most up-to-date information on the use of NSF Unidata software and data services, please consult the Software Documentation first.
Ruth, >Date: Mon, 29 Sep 2003 13:21:42 -0400 >From: Ruth Platner <address@hidden> >Organization: University of Rhode Island >To: Steve Emmerson <address@hidden> >Subject: Re: 20030926: udunits and fortran Mac OSX 10.2. The above message contained the following: > The Mac OSX Developer Tools came with two c compilers; gcc2 and gcc3. > gcc3 was the default and the one I was using Friday. I switched to gcc2 > and cc -M seems to work correctly now. Excellent! > I cleaned everything up, ran > configure again and make. The make gets a lot further than it did before > but it does fail eventually. I've included the make.log, config.log and > configure.log the output of configure. It fails in the udunits directory > because it can't find CXX. I'm not sure what CXX should be. > > Thanks again, > > Ruth ... > filename="make.log" ... > making `all' in directory /udunits-1.11.7/src/udunits > > cc -c -O -I../lib -I../port/misc -Df2cFortran udunits.c > @CXX@ -o udunits udunits.o -L/udunits-1.11.7/src/lib -ludunits > -L/udunits-1.11.7/src/port/misc -ludport -ly > /bin/sh: @CXX@: command not found > make[2]: *** [udunits] Error 1 > make[1]: *** [program] Error 2 > make: *** [udunits/all] Error 1 I believe that Mac OSX is non-standard in that it can't distinguish between "udunits.c" and "udunits.C". It looks like that is causing the makefile to think that the C++ compiler needs to be invoked instead of the C compiler. We can try tricking the makefile by setting the C++ compiler to the C compiler. Try the following: 1. Go to the top-level source directory of the UDUNITS package. 2. Perform steps 3 through 5 which are described near the end of the file INSTALL. 3. Ensure that the environment variable CXX is set to the C compiler, e.g., export CXX=gcc2 or setenv CXX gcc2 depending on your user-shell. 4. Perform steps 6 through 9 which are described near the end of the file INSTALL. Please let me know if this helps. Regards, Steve Emmerson