This archive contains answers to questions sent to Unidata support through mid-2025. Note that the archive is no longer being updated. We provide the archive for reference; many of the answers presented here remain technically correct, even if somewhat outdated. For the most up-to-date information on the use of NSF Unidata software and data services, please consult the Software Documentation first.
The problem you are encountering exists because the path to the libraries is not built-in into your program. If you do the command ldd ./prate_aphro You will see a list of the libraries it needs and that there is no specific item listed for libnetcdf.so.7. Assume that the path to libnetcdf.so.7 is, for example, /usr/local/lib. Then before you execute the g++ -o prate_aphro prate_aphro.cc -L/usr/local/lib -lnetcdf_c++ -lnetcdf command, you need to set the LD_RUN_PATH environment variable by using these commands. LD_RUN_PATH="/usr/local/lib:$LD_RUN_PATH" export LD_RUN_PATH =Dennis Heimbigner Unidata Ticket Details =================== Ticket ID: KHU-640604 Department: Support netCDF Priority: Normal Status: Closed