Compiling with the library

To compile you will need to set the C flags and to link the library, so we recommend to use the <EMPHASIS>pkg-config</EMPHASIS> command.

<PROGRAMLISTING> <SYSTEMITEM>$</SYSTEMITEM> <USERINPUT> gcc -c full_example.c `pkg-config --cflags libgda`</USERINPUT> <SYSTEMITEM>$</SYSTEMITEM> <USERINPUT> gcc -o full_example `pkg-config --libs libgda` full_example.o</USERINPUT> </PROGRAMLISTING>

Doing this will add to the C compiler command line all needed header files and library directories as well as all needed libraries for linking your GDA application. To include header files, you can just use libgda/libgda.h, which will include all GDA header files.