-
Notifications
You must be signed in to change notification settings - Fork 51
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Issue with using a local build of netcdf-c and netcdf-c++ #95
Comments
I'll take a look at this but I'm curious if the file /usr/local/include/netcdf.h exists on your system? If so, this indicates that there is another system-level netCDF-C install on your system, which may be muddying the waters. |
Regarding the |
Hi, Thanks for the comments. @WardF there was a leftover file /usr/local/include/netcdf.h and I've removed it along with any other netcdf related files in /usr. @aosterthun I tried that, but there's no netCDFCxxConfig.cmake file in my install folder, there's only a netCDFCxxConfigVersion.cmake file. Here's the installed filed for both netcdf and netcdf-cxx4 |
For one it is weird that that As you can see in #97 I'm currently also working on getting a project based installation of |
Hi, I watched the same issue. I found there might be two causes:
|
Is there any official recommendation on how to correctly use Maybe there's a Cmake command that I'm missing? find_package(netcdfCxx REQUIRED)
# ... Other configurations
target_link_libraries(${EXECUTABLE_NAME} netCDF::netcdf-cxx4 netCDF::netcdf) Also, thank you a lot for this C++ library! |
I'm running Ubuntu 20, netcdf-c 4.7.4 and the "working" branch of netcdf-cxx.
I'm compiling netcdf with
cmake -D CMAKE_INSTALL_PREFIX=~/Projects/libraries/netcdf-c/install
I'm compiling netcdf-cxx with the command:
cmake -D CMAKE_PREFIX_PATH=~/Projects/libraries/netcdf-c/install -D CMAKE_INSTALL_PREFIX=~/Projects/libraries/netcdf-cxx/install ..
In my own application where I would like to use those two librarires I'm compiling with
cmake -D CMAKE_PREFIX_PATH="~/Projects/libraries/netcdf-c/install;~/Projects/libraries/netcdf-cxx/install" ..
In my cmake file the netcdf related things are
find_package(netCDF REQUIRED)
and
Both netcdf-c and netcdf-xx compile and install fine, but when I try to build my application with make I get the following error message: "/usr/local/include/netcdf:5:10: fatal error: netcdf.h: No such file or directory"
I'm not sure why it's not finding the netcdf-cxx header files. Furthermore when I try to use "find_package(netCDFCxx REQUIRED)
" i get the cmake error "Could not find a package configuration file provided by "netCDFCxx" with any of the following names:`
Do you have any idea where I may be going wrong? Please let me know if I can provide any additional information.
The text was updated successfully, but these errors were encountered: