GTK+ FAQ | ||
---|---|---|
<<< Previous | Development with GTK+: the begining | Next >>> |
Since you are good at coding, we will not deal with compile time errors here :)
The classic command line to compile a GTK+ based program is
gcc -o myprog [c files] `pkg-config gtk+-2.0 --cflags --libs`
You should notice the backquote character which is used in this command line. A common mistake when you start a GTK+ based development is to use quotes instead of backquotes. If you do so, the compiler will complain about an unknown file called pkg-config gtk+-2.0 --cflags --libs. The text in backquotes is an instruction to your shell to substitute the output of executing this command into the commandline.
The command line above ensures that:
the correct C compiler flags will be used to compile the program (including the complete C header directory list)
your program will be linked with the needed libraries.
<<< Previous | Home | Next >>> |
How do I write security sensitive/SUID/SGID programs with GTK+? Is GTK+ secure? What's this GTK_MODULES security hole I heard about? [GTK 2.x] | Up | What about using the make utility? [GTK 2.x] |