Due to the current gap in continued funding from the U.S. National Science Foundation (NSF), the NSF Unidata Program Center has temporarily paused most operations. See NSF Unidata Pause in Most Operations for details.

Re: [netcdfgroup] Error with C++ test/example

Orion Poplawski <orion@xxxxxxxxxxxxx> writes:

> tst_filerw.cpp:27: warning: unused variable ‘g1’
> /bin/sh ../libtool --tag=CXX   --mode=link c++  -O2 -g -pipe -Wall
> -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector
> --param=ssp-buffer-size=4 -m64 -mtune=generic     -L/usr/lib64/hdf -o 
> tst_filerw tst_filerw.o ../cxx4/libnetcdf_c++4.la
> ../libsrc4/libnetcdf.la -lmfhdf -ldf -ljpeg -lhdf5_hl -lhdf5 -lz
> libtool: link: c++ -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2
> -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64
> -mtune=generic -o .libs/tst_filerw tst_filerw.o  -L/usr/lib64/hdf
> ../cxx4/.libs/libnetcdf_c++4.so ../libsrc4/.libs/libnetcdf.so
> -L/usr/lib -L/lib -lcurl /usr/lib64/hdf/libmfhdf.a
> /usr/lib64/hdf/libdf.a -ljpeg -lhdf5_hl -lhdf5 -lz -Wl,-rpath
> -Wl,/usr/lib64
> depbase=`echo tst_simple.o | sed 's|[^/]*$|.deps/&|;s|\.o$||'`;\
>       c++ -DHAVE_CONFIG_H -I. -I.. -I../fortran  -I../libsrc4
> -I/usr/include/hdf  -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2
> -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64
> -mtune=generic -MT tst_simple.o -MD -MP -MF $depbase.Tpo -c -o 
> tst_simple.o tst_simple.cpp &&\
>       mv -f $depbase.Tpo $depbase.Po
> tst_simple.cpp:20: error: expected constructor, destructor, or type
> conversion before ‘*’ token
>
> Line is:
>  NcAtomicType* ncNoType = new NcAtomicType(NC_UNSPECIFIED);;
>
> NcAtomicType doesn't appear (isn't defined) anywhere else in the
> netcdf code.  Should be using the NcType enum instead?

Are you building with --enable-cxx4?

If so, don't.

The cxx4 C++ API is not ready yet. It is experimental.

Thanks,

Ed

-- 
Ed Hartnett  -- ed@xxxxxxxxxxxxxxxx



  • 2009 messages navigation, sorted by:
    1. Thread
    2. Subject
    3. Author
    4. Date
    5. ↑ Table Of Contents
  • Search the netcdfgroup archives: