Previous: Common Data Model utilities Next: Unicode Names Table of contents Frames 2012 Unidata NetCDF Workshop > NetCDF Utilities

6.9 nc-config
The nc-config command-line utility assists with the setting of compiler and linker flags for building applications.

nc-config is a simple script that reports the configuration flags used during the netCDF build, as well as the installed version of the netCDF C-based libraries. It has lots of options, listed by invoking "nc-config --all".

Here's an example of output from:

nc-config --all
output Show popup

Here's an example of how to compile and link a C application and a Fortran application, using nc-config:

cc myapp.c -o myapp `nc-config --cflags --libs`
f95 yourapp.f -o yourapp `nc-config --fflags --flibs`

You can use the "nf-config" utility instead of "nc-config" for Fortran applications.

 


Previous: Common Data Model utilities Next: Unicode Names Table of contents Frames 2012 Unidata NetCDF Workshop > NetCDF Utilities