Click to See Complete Forum and Search --> : gtk+ help, newbie


paully1
01-21-2001, 08:32 PM
Howdy, i'm tryin to get a first time small gtk+ app to run but when I compile I get the following error

I already run gnome so would i need to download the gtk+ and glib sources? I just want to make sure before I screw something up. I would think they're already there but where can i look to be able to tell for sure?

i wrote a small gtk+ app and gcc said:

gtk-config --cflags: no such file or directory

gtk-config --libs: no such file or directory

in file included from /usr/include/gdk/gdktypes.h:33

from /usr/include/gdk/gdk.h:31
from /usr/include/gtk/gtk.h:31

/usr/include/glib.h:66: glibconfig.h: no such file or directory


thanks
paul

MPETNUCH
01-21-2001, 08:37 PM
I am not totally sure but I got sort of the same error when I was compiling GAIM. It went away after I got the glib1.2-dev, libglib-dev, and gtk1.2-dev. I think the standard packages (at least with debain) are only for being able to run GTK programs, you need the development packages to create and compile them.

farrow
01-21-2001, 10:44 PM
I assume you mean you are typing the gtk-config --cflags part in the compilation line, right?

If so, make sure you enclose gtk-config --cflags in ` `s. So, you should be typing:
gcc `gtk-config --cflags` -c whatever.c

paully1
01-21-2001, 11:35 PM
Originally posted by farrow:
I assume you mean you are typing the gtk-config --cflags part in the compilation line, right?

If so, make sure you enclose gtk-config --cflags in ` `s. So, you should be typing:
gcc `gtk-config --cflags` -c whatever.c

yeah part of the compilation line i enclosed it in quotes just forgot to put it in the post.

paully1
01-22-2001, 01:22 AM
well i was just looking at the Qt libraries. I do C++ can anyone reccomend Qt or gtk+ with the gtk-- wrapper for C++? I run gnome but either one i use should be usable to write gnome or kde apps. Thoughts?

thanks
paul

Sterling
01-22-2001, 06:38 PM
If you're looking to write a GNOME program, consider gtk--, or even just using GTK+ with your C++ program. (You have to kludge some stuff, and some typecasting that's needed gets irritating, but it DOES work) Look at what features GTK+ and Qt offer, and the APIs of each, and decide which you want to use for your program.

I'd recommend GTK+, if only because I like GNOME, and like some of the things it lets you do. And because the KDE developers have, in their recent press releases, shown that they've got a real ego problem.


------------------
-Sterling
"There is no Linuxnewbie.org cabal..."

paully1
01-22-2001, 09:24 PM
Originally posted by Sterling:
If you're looking to write a GNOME program, consider gtk--, or even just using GTK+ with your C++ program. (You have to kludge some stuff, and some typecasting that's needed gets irritating, but it DOES work) Look at what features GTK+ and Qt offer, and the APIs of each, and decide which you want to use for your program.


I'd recommend GTK+, if only because I like GNOME, and like some of the things it lets you do. And because the KDE developers have, in their recent press releases, shown that they've got a real ego problem.




I have Qt and I plan on using gtk--, although I already run gnome I still need to install the gtk+ and lib packages right? I just dont want install them to find out it could fudge up my x windows. After I get gtk+ in i plan on installing the gtk-- wrapper. This way, like you said I can get some hands on with both and heck maybe just use both.

I've read a couple posts about the reliability of the gtk-- wrapper. Are there any stability issues? I'll do gtk+ if I have to but I would much prefer straight C++ with the gtk-- wrapper.

thanks
paul



[This message has been edited by paully1 (edited 22 January 2001).]

tminos
01-23-2001, 12:15 AM
Use the BACKQUOTES for your gtkconfig part.

Look at your number row. See the button next to 1 that has the ~ (tilde) key and the ` (backquote) key? Use the backquote key for the gtkconfig part.

Sterling
01-23-2001, 10:28 AM
If you're running a debian system, you need to install the libgtk1.2-dev, libgtkmm-dev, libgtk1.2-doc, libgtk1.2, and libgtkmm packages. On Red Hat or an RPM-based system, there should be similar packages. The last two you've probably already got.

As a rule, under Debian, installing -dev packages will rarely screw things up. They're mostly just header files and static library files that are used when compiling programs. Unless another package installs files of the same name in the same place (Debian is supposed to have guidelines in place to prevent this) you won't have a problem.

------------------
-Sterling
"There is no Linuxnewbie.org cabal..."

paully1
01-23-2001, 04:50 PM
Originally posted by Sterling:
If you're running a debian system, you need to install the libgtk1.2-dev, libgtkmm-dev, libgtk1.2-doc, libgtk1.2, and libgtkmm packages. On Red Hat or an RPM-based system, there should be similar packages. The last two you've probably already got.

As a rule, under Debian, installing -dev packages will rarely screw things up. They're mostly just header files and static library files that are used when compiling programs. Unless another package installs files of the same name in the same place (Debian is supposed to have guidelines in place to prevent this) you won't have a problem.



I'm sorry forget to say I'm runnin slack 7.1, would you happen to know the devel package names that I need?

thank a lot
paul

paully1
01-23-2001, 09:34 PM
Originally posted by tminos:
Use the BACKQUOTES for your gtkconfig part.

Look at your number row. See the button next to 1 that has the ~ (tilde) key and the ` (backquote) key? Use the backquote key for the gtkconfig part.

yeah i used the backquote

Sterling
01-23-2001, 10:53 PM
I don't, but they should be similar to those.

------------------
-Sterling
"There is no Linuxnewbie.org cabal..."