How do I use netCDF shared libraries?
With netCDF version 3.6.2, shared libraries can be built on platforms that support them by using the –enable-shared argument to netCDF configure script. Users of earlier versions of netCDF can build shared libraries by setting flags correctly during builds. When you use a static library, the code is copied from the library into your program when the program is built. The library is only needed at build time. With a shared library the code in the library is not copied into your executable, so the library is needed every time the program is run. If you write a program that uses the netCDF shared library, the operating system will have to find it every time your program is run. It will look in these places: • Directories you specified as shared library locations at build time. Unfortunately this is done differently with different compilers. • Directories specified in the environment variable LD_RUN_PATH at build time. • Directories specified in the OS-specific environment variable for th
With netCDF version 3.6.2, shared libraries can be built on platforms that support them by using the –enable-shared argument to netCDF configure script. Users of earlier versions of netCDF can build shared libraries by setting flags correctly during builds. When you use a static library, the code is copied from the library into your program when the program is built. The library is only needed at build time. With a shared library the code in the library is not copied into your executable, so the library is needed every time the program is run. If you write a program that uses the netCDF shared library, the operating system will have to find it every time your program is run. It will look in these places: • Directories you specified as shared library locations at build time. Unfortunately this is done differently with different compilers. • Directories specified in the environment variable LD_RUN_PATH at build time. • Directories specified in the OS-specific environment variable for th