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.
> Organization: Dept. of Oceanography, Dalhousie University > Keywords: 199501261529.AA01388 ncopers Hi Steven, > I've downloaded 2.3.2-patch3 and 2.3.2-patch4. Patch 3 installed without > problem, but patch 4 gave the following error: > > ... > |diff -c1 -r oldc++/Makefile c++/Makefile > |*** oldc++/Makefile Sun Apr 25 10:17:39 1993 > |--- c++/Makefile Tue Jan 31 16:23:38 1995 > - - -------------------------- > Patching file Makefile using Plan A... > Hunk #1 failed at 1. > Hunk #2 failed at 5. > Hunk #3 failed at 15. > Hunk #4 failed at 56. > Hunk #5 failed at 60. > Hunk #6 failed at 69. > Hunk #7 failed at 73. > 7 out of 7 hunks failed--saving rejects to Makefile.rej > ... > > The remaining sections of the patch were successfull. > > Could you please send me a copy of c++/Makefile so that I can install > pl4? Thank you in advance! That's strange, I just tested this by applying patches 3 and 4 successively to a copy of the distribution, and all the patches succeeded. Maybe I'm using a different version of `patch', although patches generated by a simple `diff' are supposed to work with any version of `patch'. Anyway, just FYI, here's the version I'm using: % patch -v $Header: patch.c,v 2.0.2.0 90/05/01 22:17:50 davison Locked $ Patch level: 12u7 I've appended the resulting c+/Makefile. ______________________________________________________________________________ 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