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

Re: 950109: running "configure"



> Organization: Software Engineering Research Group, Michigan State University
> Keywords: 199501091850.AA14444

Hi Paul,

> Hi, I just got the netcdf distribution.  I am trying to install it on
> a Sparc 10 running Solaris.  
> 
> acs:ridgeback-> uname -a
> SunOS ridgeback 5.3 Generic_101318-41 sun4m sparc
> 
> 
> I am trying to use the "CC" 
>       ridgeback-> CC -V /tmp/dog.c
>       CC: SC3.0 15 Dec 1993
>       ccfe: SC3.0 15 Dec 1993 C++4.0
> 
> I do:
> 
> ridgeback-> setenv CC CC
> 
> Then I run configure:
> ridgeback-> ./configure --prefix=/home/blah/blah/netcdf-232pl2/dist
> 
> and get:
> reading configuration customizations
> checking for type of operating system
 ...
> creating libsrc/netcdf.h
> "conftest.c", line 4: Error: The function readsub must have a prototype.
> "conftest.c", line 6: Error: Type name expected instead of "(".
> "conftest.c", line 10: Error: inpath is not defined.
 ...
> 10 Error(s) detected.
> conftest: No such file or directory
> 
> See, I'm probably going to be using this from c++ code and want to use CC.
> Has anyone tried to install using the CC compiler?  

The programs created by the `configure' script to derive properties of the
platform and generate the appropriate Makefiles are C programs, not C++
programs, so CC will not work for them.  Also the netCDF library is written
in C rather than C++, although a C++ interface (that calls the underlying C
implementation) is provided for experimentation and evaluation.  If you first
use the C compiler to build the library from source, you can then use a C++
compiler to compile the C++ interface and test program.

Since the `configure' script has not yet generated any Makefiles on your
machine, you will need to rerun `configure' specifying a C compiler (or just
using the default cc, if that gets the ANSI C compiler).  After running
`make' and `make test', you can change into the netcdf/c++ directory and use
the Makefile their (which was not generated by `configure' but comes
hardwired) to build the C++ interface.

Please let us know if you still see any problems.

______________________________________________________________________________

Russ Rew                                                UCAR Unidata Program
address@hidden                                          P.O. Box 3000
http://www.unidata.ucar.edu/                          Boulder, CO 80307-3000
______________________________________________________________________________