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

[netCDF #KPS-257863]: compiling/ linking netcdf4 example (cpp) on



> Hello there.
>
> I intent to use the new C++ API of netcdf4(daily snapshot) to write a netcdf
output code for our model. I'm currently struggeling to test any netcdf4 c++
code here. Make check goes fine (as far as I can tell).
> In order to avoid the fortran trouble I disabled fortran compile options.
>
> The packages were compiled with the following options:
>
> hdf5 was build like this:
> ./configure --prefix=/opt/hdf5 --with-zlib=/opt/zlib --with-gnu-ld
--enable-hl --enable-cxx --disable-fortran
>
> netcdf was huild like this:
> ./configure --prefix=/opt/netcdf4 --with-zlib=/opt/zlib --with-hdf5=/opt/hdf5
> --enable-extra-example-tests --enable-extra-tests --enable-cxx-4
> --enable-netcdf-4 --with-gnu-ld --disable-f77
>
> I have to confess that I'm not that familiar with the C++ build process so I
might just miss some compile/ link commands and I cannot really read the
information out of the Makefile there.
>
> But no matter what I try when compiling/ linking I always get "undefined
symbol" errors. Now, I'm not sure if thats the case because I try this on a
macbook pro with the modified apple gcc (4.0) or I just miss the right options
when issuing the command. Could you tell me the command to compile and link the
simple_xy examples given my compilation options above so I can further assess
my problem?
>
> e.g., g++ -I. -I.. -I/opt/(...)
>
> thanks a bunch,
> christian
>
>
> --
> Psst! Geheimtipp: Online Games kostenlos spielen bei den GMX Free Games!
> http://games.entertainment.gmx.net/de/entertainment/games/free
>
>

Howdy Christian!

You should be building the latest netCDF-4 snapshot. Get it here:
http://www.unidata.ucar.edu/software/netcdf/builds/snapshot/netcdf-4/

The cxx4 API is in very early, experimental, developmental phase. In fact, it
is not nearly complete.

What you want to do is build without it, and use the C API from C++.

We hope that the cxx4 API will be ready in a future release of netCDF, but it
is certainly not ready now.

Thanks,

Ed

Ticket Details
===================
Ticket ID: KPS-257863
Department: Support netCDF
Priority: Normal
Status: Closed