Dear Marcus,
You can always check the available options using: ./configure --help
I have installed the netcdf-c library in a non-standard location,
therefore, I have to use CPPFLAGS and LDFLAGS:
CPPFLAGS=-I<path-to-netcdf>/include LDFLAGS=-L<path-to-netcdf>/lib
./configure --prefix=$fld_install
This works for me.
Greetings, Richard
On 2/21/19 2:13 PM, Markus Klein wrote:
Hi,
I am trying to install NetCDF on my Ubuntu 18.04. for C++ to use
.nc-files in my code for further calculations. Until now, I have
installed curl, zlib, hdf 5 and the actual version of NetCDF-C
(netcdf-c-4.6.2).
I have tested NetCDF-C on an example file (simple_xy_wr.c from
https://www.unidata.ucar.edu/software/netcdf/examples/programs/) which
compiles and runs without any problems.
After that, I wanted to install NetCDF for C++. Therefore, I
downloaded the actual library (netcdf-cxx4-4.3.0.) and tried to
configure the unpacked library by following command:
./configure --prefix=$fld_install --enable-cxx-4 ($fld_install is my
directory where I want to install NetCDF-C++)
Unfortunately, I receive following warning after configuring the library:
configure: WARNING: unrecognized options: --enable-cxx-4
The same error occurs by trying –enable-netcdf-4.
After installing the library with the make & make install procedure, I
can not compile any C++ code which contains some NetCDF-C++ -Data
Structures.
I am not able to find any error in my approach and are pretty sure
that my paths of NetCDF-C are set correctly. Maybe I got a wrig
version combination of NetCDF-C and NetCDF-C++ or forgot something by
configuring the libraries.
I would be very thankful for any help or hint of you where I have made
a mistake by installing NetCDF-C or NetCDF-C++. Thank you for your
help in advance.
With best regards
Markus