GNU Info

Info Node: (gimpprint.info)Using libgimpprint

(gimpprint.info)Using libgimpprint


Next: Integrating libgimpprint Prev: Overview Up: Top
Enter node , (file) or (file)node

Using libgimpprint
******************

   This chapter describes how to write programs that use libgimpprint.

Code prerequisites
==================

   To use libgimpprint with a program, several steps must be taken:

  1. Include the master libgimpprint header `<gimp-print/gimp-print.h>.'

  2. Call `stp_init()'.

  3. Link with libgimpprint.

   The following is a short example program. It does not do anything
useful, but it does everything required to link with libgimpprint and
call other functions from libgimpprint.

     #include <gimp-print/gimp-print.h>
     
     int
     main (int argc, char *argv[])
     {
       stp_init ();
       return (0);
     }

Linking with libgimpprint
=========================

   To link a program with libgimpprint, then `-lgimpprint' needs to be
passed to the compiler when linking. For example, to compile and link
`prog.c' the following commands would be used:

     gcc -c prog.c
     gcc -o prog -lgimpprint prog.o

   The compiler and linker flags needed may vary depending on the
options GIMP-Print was configured with when it was built. The
`gimpprint-config' script will give the correct parameters for the
local installation (Note: gimpprint-config).


automatically generated by info2www version 1.2.2.9