Compiling and Linking

The library for linking is libvolume_io.a, which is in /usr/local/lib, and the related include files are in the directory, /usr/local/include under volume_io. Both directories are usually in the compiler search path. Source files making calls to Volume IO functions must have the following line at the top, to include the relevant type definitions and prototypes:

Example 1.

#include  <volume_io/volume_io.h>

In order to link with BIC Volume IO Library, the relevant libraries must be specified:

Example 2. Compiling with Volume IO

cc test_volume_io.o  -o test_volume_io \
           -lvolume_io -lminc -lnetcdf -lm -lmalloc

The two libraries, minc and netcdf are usually in /usr/local/lib, which is automatically in the search path. The -lm option includes the math library, which is sometimes called by the BIC Volume IO Library. The -lmalloc library provides faster and more robust memory allocation than the default.