|
|
This chapter describes how to write programs that use libgimpprint.
To use libgimpprint with a program, several steps must be taken:
<gimp-print/gimp-print.h>.
stp_init()
.
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); }
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 @command{gimpprint-config} script will give the correct parameters for the local installation (see section 3.1 @command{gimpprint-config}).
Go to the first, previous, next, last section, table of contents.