The Developer's Guide to Gutenprint
<<< Previous | Using libgutenprint | Next >>>

# Linking with libgutenprint

To link a program with libgutenprint, the option `-lgutenprint` needs to be passed to the compiler when linking. For example, to compile and link `stpimage.c` the following commands would be used:

    $ gcc -c stpimage.c
    $ gcc -o stpimage -lgutenprint stpimage.o

The compiler and linker flags needed may vary depending on the options Gutenprint was configured with when it was built. The pkg-config script will give the correct parameters for the local installation.

<<< Previous | Home | Next >>>
Using libgutenprint | Up | Integrating libgutenprint