Find the answer to your Linux question:
Results 1 to 3 of 3
hi, i am trying to learn gtk (these will be the first graphical program i have ever made). dont want to learn windows api because one day i might use ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Nov 2004
    Location
    Perth, Western Australia
    Posts
    59

    gtk can't find libraries?


    hi, i am trying to learn gtk (these will be the first graphical program i have ever made). dont want to learn windows api because one day i might use it anyway, i am trying to follow the tutorial at the gtk web site and i got an error that it could not find gtk/gtk.h so i searched for gtk.h and found it in /usr/include/gtk-2.0/gtk/. i changed the reference in the source code to 'gtk-2.0/gtk/gtk.h' instead, and it found that file, but the gtk.h file is referencing some files that it can't find, so i made a symlink '/usr/include/gtk/' to '/usr/include/gtk-2.0/gtk/', but it still doesnt work. can someone please help?

    ps i am using fedora core 3

  2. #2
    Linux User
    Join Date
    Oct 2004
    Location
    Serbia&Montenegro
    Posts
    281
    Do you have gtk 1.2 installed? In Slackware I have 1.2 installed and I just include gtk/gtk.h and it's all ok.
    Linux registered user #358842
    Human knowledge belongs to the world.

  3. #3
    Just Joined!
    Join Date
    Nov 2004
    Location
    Perth, Western Australia
    Posts
    59
    i just chose everything under "gnome software development" and "x software development" (didnt know if i would need x devel libs). i couldnt find 'gtk' with 'rpm -q', but i found 'gtk2', 'glib', and 'glib2'. isnt glib the main gtk library?

    EDIT: I also found glib2-devel and gtk2-devel but not glib-devel or gtk-devel

    EDIT: I found the problem. I just went to the tutorial on the site and the compile command they tell you to type is different from the download version. in the d/l version it says
    Code:
    gcc base.c -o base `gtk-config --cflags --libs`
    and in the online version it says
    Code:
    gcc base.c -o base `pkg-config --cflags --libs gtk+-2.0`
    [/code]

  4. $spacer_open
    $spacer_close

Posting Permissions

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