Previous: Examples of nccopy use Next: Unicode Names Table of contents Frames 2011 Unidata NetCDF Workshop > NetCDF Utilities

5.9 nc-config
The nc-config command-line utility assists with the setting of compiler and linker flags for C, C++, and Fortran applications.

nc-config is a simple script that reports the settings of C and Fortran 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  `nc-config --cflags`  myapp.c -o myapp  `nc-config --libs`
f95  `nc-config --fflags`  yrapp.f -o yrapp  `nc-config --flibs`

 


Previous: Examples of nccopy use Next: Unicode Names Table of contents Frames 2011 Unidata NetCDF Workshop > NetCDF Utilities