Jump to content

gtk-2.0 folder issue (Fedora 20)

Hi,

 

I have ran into an issue thats rather annoying.

I installed gtk-2.0 with the following command:

$ sudo yum install gtk2-devel

This is what the gtk documentation says to use for the inclusion section:

#include <gtk/gtk.h>

^^

Eclipse claims that the directory does not exist and there fore the code will not compile.

 

A quick search of "/usr/include/" discovers that a folder labled "gtk-2.0" is there with the folders "gdk" and "gtk". Switching the inclusion to:

#include <gtk-2.0/gtk/gtk.h>

fixes the Eclipse error but the program will still not compile complaining that one of header files in the gtk folder cannot find "gdk/*something*"

 

In my mind a simple solution is just to run the following commands:

sudo cp "/usr/include/gdt-2.0/gtk" "/usr/include/"sudo cp "/usr/include/gdt-2.0/gdk" "/usr/include/"

Those commands each return :

cp: omitting directory ‘usr/include/gtk-2.0/gtk’cp: omitting directory ‘usr/include/gtk-2.0/gdk’

So how do I fix this?

Java tuts:


Constructors, possibly more to come.


221 Goodbye.

Link to comment
Share on other sites

Link to post
Share on other sites

First off why would you want to build upon GTK2 when GTK3 is pretty much standard in every major distribution.

Link to comment
Share on other sites

Link to post
Share on other sites

First off why would you want to build upon GTK2 when GTK3 is pretty much standard in every major distribution.

 

it isn't for anything special, im just playing around with different libraries and getting used to reading documentations. I wasn't aware of GTK3. 

Java tuts:


Constructors, possibly more to come.


221 Goodbye.

Link to comment
Share on other sites

Link to post
Share on other sites

it isn't for anything special, im just playing around with different libraries and getting used to reading documentations. I wasn't aware of GTK3. 

Yea I would give GTK3 a look as it's pretty much standard on every major distribution. At least once you get the hang of using it you wont have to worry about using a previous generation toolkit.

Link to comment
Share on other sites

Link to post
Share on other sites

Yea I would give GTK3 a look as it's pretty much standard on every major distribution. At least once you get the hang of using it you wont have to worry about using a previous generation toolkit.

 

ahhhhh, I found my mistake while looking at a doc, I needed to add `pkg-config --libs --cflags gtk+-3.0` to the compile line.

Java tuts:


Constructors, possibly more to come.


221 Goodbye.

Link to comment
Share on other sites

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×