Find the answer to your Linux question:
Results 1 to 2 of 2

Thread: GTK Sources

Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1

    GTK Sources

    Hello, I'm learning GTK , and would like to use Codeblocks, and/or KDEvelop, and compile my c files using that, but always get an error about gtk/gtk.h not found, but can't figure out how to add the commands... I normally type gcc -o Program1 main.c `pkg-config --libs --cflags gtk+-2.0` That's a lot to type every time to compile.. Isn't there an easier way, in KDevelop, Monodevelop, and/or Codeblocks to make this step quicker, by adding some sort of I-/usr/include commands, or something?? thanks in advance, =). I looked online for some results, but didn't come across anything handy..

  2. #2
    Linux Engineer hazel's Avatar
    Join Date
    May 2004
    Harrow, UK
    Well, there's a simpler solution and that's to use bash's alias facility. Put into your .bashrc file|:

    alias compile="gcc \`pkg-config gtk+-2.0 --cflags --libs\` -o "
    and then you can compile any gtk program by typing "compile output input.c"
    "I'm just a little old lady; don't try to dazzle me with jargon!"

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts