Unidata / netcdf-cxx4

Official GitHub repository for netCDF-C++ libraries and utilities.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Fail to compile the example code

Gilaverbuch opened this issue · comments

Hey,
I have just installed the netcdf-cxx4 package according to the installation steps.
I am trying to compile the example code with both g++ and clang++ compilers, but none of them works. From the clang++ compiler, I get numerous errors, and the g++ compiler cannot find the netcdf source file (" fatal error: netcdf: No such file or directory").

This is the output of nc-config --all :
`This netCDF 4.6.1 has been built with the following features:

--cc -> /opt/concourse/worker/volumes/live/a8e407e3-d4ec-44ee-693f-1c4d86eb0106/volume/libnetcdf_1539979321820/_build_env/bin/x86_64-apple-darwin13.4.0-clang
--cflags -> -I/Users/gilaverbuch/miniconda3/include
--libs -> -L/Users/gilaverbuch/miniconda3/lib -lnetcdf -lmfhdf -ldf -lhdf5_hl -lhdf5 -lpthread -lz -ldl -lm -lcurl

--has-c++ -> no
--cxx ->

--has-c++4 -> yes
--cxx4 -> /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/c++
--cxx4flags -> -I/usr/local/include
--cxx4libs -> -L/usr/local/lib -lnetcdf-cxx4 -lnetcdf

--has-fortran-> yes
--fc -> nf-config not yet implemented for cmake builds
--fflags -> nf-config not yet implemented for cmake builds
--flibs -> nf-config not yet implemented for cmake builds
--has-f90 -> nf-config not yet implemented for cmake builds
--has-f03 -> nf-config not yet implemented for cmake builds

--has-dap -> yes
--has-dap2 -> yes
--has-dap4 -> yes
--has-nc2 -> yes
--has-nc4 -> yes
--has-hdf5 -> yes
--has-hdf4 -> yes
--has-logging-> yes
--has-pnetcdf-> no
--has-szlib -> no
--has-cdf5 -> yes
--has-parallel-> no

--prefix -> /Users/gilaverbuch/miniconda3
--includedir-> /Users/gilaverbuch/miniconda3/include
--libdir -> /Users/gilaverbuch/miniconda3/lib
--version -> netCDF 4.6.1`

Does anyone have an idea of how to solve it?

Thanks a lot!