0

I posted this in the C++ forum, apparently this is a better place... I need to install GTK+ on Linux, but since im obviously still a complete ignorant fool when it comes to linux (have never used it before) I need help. I dont understand how to install all of the tools that it requires. Can anyone help me to set these things up? I tried to follow the instructions for installation but it didn't help. I keep getting an error with $ make install saying that i dont have permission to access /usr/local for some reason. I just have no clue on this...

9
Contributors
17
Replies
25
Views
8 Years
Discussion Span
Last Post by aralk
0

you need to run it as root use the sudo -i then login as root
then run the ./configure command and then the make install command
but you need to be logged in as root or belong to a group that has access to that directory

0

well that fixed that problem but ive run into a whole host of new problems... thanks anyways

0

Is there any reason you can't use the package manager (Synaptic in this case) to install it? It will resolve all of the dependencies for you.

0

I wanted to do that, seeing as it would be simpler by leaps and bounds, but alas i cant seem to find it in a package! I searched all of the GTK+ page and can't find it in anything but a source tarball (please excuse me if anything i say about stuff sounds stupid, still EXTREMELY new to all this linux stuff! Not an easy transition from windows for me). If anyone has a package though, i would be MORE than happy to use that since i dont have a freakin clue what im doing with the terminal quite yet.

0

it takes some time of yelling and hiting the keyboard before it becomes like second nature try to stick with it you'll get it

i could be wrong but i think this would work in your distro

run the following as a command

sudo apt get install gnome-core-devel build-essential install libgtk2.0-dev libgtk2.0-doc devhelp
0
sudo apt get install gnome-core-devel build-essential install libgtk2.0-dev libgtk2.0-doc devhelp

this command did not work, but i modified it based on what the terminal was telling me and this is what ended up actually doing something:

sudo apt-get install gnome-core-devel build-essential libgtk2.0-dev libgtk2.0-doc dev-help

is that the same thing or did i install some weird never-get-rid-of-this thing?

0

well, it says it installed the package, but now when i try to use it the programs will not compile. error messages:

Package gtk+-2.0 was not found in the pkg-config search path.
Perhaps you should add the directory containing `gtk+-2.0.pc'
to the PKG_CONFIG_PATH environment variable
No package 'gtk+-2.0' found
first.c:1:21: error: gtk/gtk.h: No such file or directory
first.c: In function ‘main’:
first.c:5: error: ‘GtkWidget’ undeclared (first use in this function)
first.c:5: error: (Each undeclared identifier is reported only once
first.c:5: error: for each function it appears in.)
first.c:5: error: ‘window’ undeclared (first use in this function)
first.c:9: error: ‘GTK_WINDOW_TOPLEVEL’ undeclared (first use in this function)

any ideas?

0

Ok, so i got it all installed, but now when i try to use:

#include <gtk/gtk.h>

to include it, i get errors that the file cannot be found. apparently it was installed at /usr/include/gtk-2.0/gtk/gtk.h. This file is found when i include it, only problem is, when i do, none of the files included in it are found. how do i configure gcc to find these files correctly?

0

Sorry to bump this but now i have another problem... I am compiling using the configuration stated on GTK+ website:

gcc -Wall -g test.c -o test `pkg-config --cflags gtk+-2.0` \ `pkg-config --libs gtk+-2.0`

but i keep getting the following error:

gcc:  -lgtk-x11-2.0: No such file or directory

Im guessing this must be another package or something that i need to install... can anyone tell me what im missing?

0

uhm....excuse me....may i know what ubuntu do you use? because i guess that the command line
"sudo apt-get install libgtk2.0-dev" is enough to install gtk on ubuntu...
or if the application you wish to install is Gnome apps..may be you wish to type the command line
"sudo apt-get install gnome-core-devel"
i'm using ubuntu 9.04 jaunty jackalope and i don't have any trouble with it...

0

Im using jaunty as well, 9.04. I guess i'll have a try with that, thank you.

0

sudo apt-get install gnome-core-devel build-essential libgtk2.0-dev libgtk2.0-doc dev-help
Reading package lists... Done
Building dependency tree
Reading state information... Done
E: Couldn't find package dev-help


it doesnt work

i cant install gtk+ .
someone can help me please
firts time i use that SO

0

Hitting better chip

Hitting better chip shots requires a few fundamentals, www.golfwholesale18.com most of which get ishiner overlooked by beginner and better players alike. Let’s look at a few and get your chipping back on track.

0

There are a couple of typos in the command given. It should read:
sudo apt-get install gnome-core-devel build-essential libgtk2.0-dev libgtk2.0-doc devhelp

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.