[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

gcc/g77/g++ compilers on mort



Tom,

Yesterday after rebuilding g77 3.1, I found the following worked for
netCDF on mort:

 CC=/usr/bin/gcc
 CPPFLAGS=-Df2cFortran
 FC=/sw/bin/g77
 CXX=''

(I think I didn't specify the absolute path name of the gcc, which was
version 3.2 from the Mac OS X 10.2.3 release.)

Since then, I verified that setting CXX=/usr/bin/g++ works with the
above.

Also, I downloaded the binary installation for gcc/g77/g++ version 3.3
compilers from 

  http://dryden.biol.yorku.ca/darwin.html

which was *much* easier than rebuilding these from scratch, and
installed them in /usr/local/bin on mort.  The download and install
took less than a minute.  These worked fine with the current netCDF
beta, as long as I specify an -no-cpp-preload in the CFLAGS: 

  CC=/usr/local/bin/gcc
  CPPFLAGS=-Df2cFortran
  CFLAGS=-no-cpp-precomp
  FC=/usr/local/bin/g77
  CXX=/usr/local/bin/g++

The Mac OS X developer tools from Apple come with version 3.2 of gcc
and g++, but no g77, so until that gets added to their distribution,
it's necessary to either build g77 or download it from the above site.

If it would help, I could provide a binary distribution of netCDF-3.1beta
for Mac OS X 10.2.x sites.

--Russ