Results 1 to 3 of 3

Thread: How to compile gtk with Code::blocks

  1. #1
    Join Date
    Dec 2006
    Location
    Hogwarts, `UNKNOWN`
    Beans
    Hidden!
    Distro
    Ubuntu 8.10 Intrepid Ibex

    How to compile gtk with Code::blocks

    Hi there
    I use Code::blocks for compiling terminal programs. Lately I want to compile gtk programs using Code::blocks. However when I try to compile a gtk app. It is not able to find the gtk/gtk.h header files and libraries. And receive errors.
    Code:
    ERROR: gtk/gtk.h: No such file or directory
    I have already installed th libgtk2.0-dev package and have successfully compiled it in terminal.
    Is there any way so that I can compile GTK programs in Codeblocks?

  2. #2

    Re: How to compile gtk with Code::blocks

    You need to include the libraries. (/usr/include/gtk-2.0) and etc, in the build / project options.

  3. #3
    Join Date
    Dec 2006
    Location
    Hogwarts, `UNKNOWN`
    Beans
    Hidden!
    Distro
    Ubuntu 8.10 Intrepid Ibex

    Re: How to compile gtk with Code::blocks

    Well I set up options globally since I wanted to use code::blocks just to practice gtk.
    I went to Settings->Compilers and Debuggers and added:
    To the other options in compiler:
    Code:
    `pkg-config --cflags gtk+-2.0 `
    And to the other option in linker:
    Code:
    `pkg-config --libs gtk+-2.0 `
    Anyway thanks.

Bookmarks

Posting Permissions

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