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

Re: 950224: netCDF Problems



>Organization: Research Centre Karlsruhe, Institute of Applied Computer Science
>Keywords: 199502240917.AA21634

Hi,

> could you please help us in creating the nctst test file? The following bugs
> have appeared during compilation:
> 
> iaipromise3[/usr/local/netcdf/netcdf-232pl2/c++]# make
> netcdf.o nctst.o ncvalues.o -L../libsrc -lnetcdf -o nctst
> netcdf.o: Command not found.

I don't recognize this bug.  It appears as if your netcdf/c++/Makefile has
been changed or edited in some way that caused a line in the Makefile to get
broken into two lines.  If you want to check your Makefile, I've appended a
copy of what it should look like from the netcdf-232pl2 distribution after
applying the two patches for the C++ interface that are available from the
two files:

    ftp://ftp.unidata.ucar.edu/pub/netcdf/2.3.2-patch3
and
    ftp://ftp.unidata.ucar.edu/pub/netcdf/2.3.2-patch4

These fix some problems that have been reported with the C++ interface.

After applying these patches, you need to remake the netCDF library from the
`configure' step, since one of these patches changes a file that is used as
input to the `configure' script.

Then you should be able to `make all test' from the top-level netcdf/
directory, then `make all test' from within the netcdf/c++/ subdirectory.

Please let us know if this doesn't fix the problem.

______________________________________________________________________________

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


# $Id: Makefile,v 1.15 1995/01/31 21:16:50 russ Exp $
#
#       Development Makefile for netcdf c++ interface
#

INCDIR          = ../libsrc
LIBDIR          = ../libsrc

CCC             = CC
INCLUDES        = -I$(INCDIR)

CCFLAGS         = -g
MANIFEST        = Makefile README example.c example.cc example.cdl \
                  nctst.cc ncvalues.cc ncvalues.hh netcdf.cc netcdf.hh \
                  expected nc.txn nc.info
DEFINES         =
CPPFLAGS        = $(INCLUDES) $(DEFINES)
LIBRARY         = netcdf_c++
LIBS            = -L$(LIBDIR) -lnetcdf -L. -l$(LIBRARY)
LIB_A           = lib$(LIBRARY).a
PURIFY          = purify

LIB_SRCS        = netcdf.cc ncvalues.cc
LIB_OBJS        = netcdf.o ncvalues.o

.SUFFIXES:
.SUFFIXES: .o .cc

# Compile C++ code.
#
.cc.o:
        $(CCC) -c $(CCFLAGS) $(CPPFLAGS) $<

# a test program that uses some of the draft C++ interface
PROG = nctst
PROG_SRCS       = nctst.cc
PROG_OBJS       = nctst.o

all: library $(PROG)

library:    $(LIB_A)

$(PROG) : $(PROG_OBJS) $(LIB_A)
        $(CCC) $(PROG_OBJS) $(LIB_A) $(LIBS) -o $@

$(LIB_A):          $(LIB_OBJS)
        $(AR) rcuv $@ $(LIB_OBJS)
        # If ranlib isn't found, that's OK
        -ranlib $@

test:   expected $(PROG)
        ./$(PROG) > test.out
        @cmp expected test.out && \
            echo "*** $(PROG) test successful ***" ;

nctst.pure:     $(PROG_OBJS)
        $(PURIFY) $(LINK.cc) $(PROG_OBJS) $(LIB_A) $(LIBS) -o $@
        ./$@

clean:
        -rm -f $(PROG_OBJS) $(PROG) $(LIB_OBJS) $(LIB_A) example.nc test.out

distclean:      clean

netcdf.o: netcdf.hh $(INCDIR)/netcdf.h netcdf.cc
ncvalues.o: ncvalues.hh ncvalues.cc
nctst.o: netcdf.hh nctst.cc

nctst_src: nctst.cc netcdf.cc ncvalues.cc
        #load -I../libsrc nctst.cc netcdf.cc ncvalues.cc
        #load -L../../lib ../../lib/libnetcdf.a
        #link

print: nctst.cc netcdf.hh netcdf.cc ncvalues.hh ncvalues.cc
        vgrind -s11 -lC++ -t nctst.cc netcdf.hh netcdf.cc ncvalues.hh \
                                ncvalues.cc | lpr

nc.hc:  nc.ps
        lpr nc.ps

nc.dvi: nc.txn
        tex nc.txn
        texindex nc.fn nc.cp
        tex nc.txn

nc.ps:  nc.dvi
        dvips -o nc.ps -r0 nc.dvi

nc.info: nc.txn
        makeinfo nc.txn

MANIFEST.echo:
        @echo $(MANIFEST) | fmt -1