PDA

View Full Version : gui C question



pythonsyntax
October 21st, 2010, 04:24 PM
What would be good GUI tool in C to use for ubuntu?

Simian Man
October 21st, 2010, 04:28 PM
If you're set on using C, GTK+ is your best option. I'd really not recommend C for GUI applications though.

pythonsyntax
October 21st, 2010, 04:29 PM
is there a guide how to use it?

Simian Man
October 21st, 2010, 04:31 PM
is there a guide how to use it?

Here ya go. (http://library.gnome.org/devel/gtk-tutorial/stable/)

pythonsyntax
October 21st, 2010, 04:37 PM
What tool kit do i need to download?I do got gtk+ install but i don't see the header i need.

worseisworser
October 21st, 2010, 04:50 PM
sudo aptitude search libgtk | grep dev
...
sudo aptitude install libgtk2.0-dev


use google

pythonsyntax
October 21st, 2010, 05:09 PM
that what i have installed but can't find the headers.

worseisworser
October 21st, 2010, 05:14 PM
http://library.gnome.org/devel/gtk-tutorial/stable/x111.html

..what?




lnostdal@blackbox:~/programming/sbcl-git$ pkg-config --cflags gtk+-2.0
-pthread -I/usr/include/gtk-2.0 -I/usr/lib/gtk-2.0/include -I/usr/include/atk-1.0 -I/usr/include/cairo -I/usr/include/gdk-pixbuf-2.0 -I/usr/include/pango-1.0 -I/usr/include/gio-unix-2.0/ -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -I/usr/include/pixman-1 -I/usr/include/freetype2 -I/usr/include/libpng12
lnostdal@blackbox:~/programming/sbcl-git$ pkg-config --cflags gtk+-2.0
-pthread -I/usr/include/gtk-2.0 -I/usr/lib/gtk-2.0/include -I/usr/include/atk-1.0 -I/usr/include/cairo -I/usr/include/gdk-pixbuf-2.0 -I/usr/include/pango-1.0 -I/usr/include/gio-unix-2.0/ -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -I/usr/include/pixman-1 -I/usr/include/freetype2 -I/usr/include/libpng12
lnostdal@blackbox:~/programming/sbcl-git$ pkg-config --cflags gtk+-2.0
-pthread -I/usr/include/gtk-2.0 -I/usr/lib/gtk-2.0/include -I/usr/include/atk-1.0 -I/usr/include/cairo -I/usr/include/gdk-pixbuf-2.0 -I/usr/include/pango-1.0 -I/usr/include/gio-unix-2.0/ -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -I/usr/include/pixman-1 -I/usr/include/freetype2 -I/usr/include/libpng12
lnostdal@blackbox:~/programming/sbcl-git$ pkg-config --cflags gtk+-2.0
-pthread -I/usr/include/gtk-2.0 -I/usr/lib/gtk-2.0/include -I/usr/include/atk-1.0 -I/usr/include/cairo -I/usr/include/gdk-pixbuf-2.0 -I/usr/include/pango-1.0 -I/usr/include/gio-unix-2.0/ -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -I/usr/include/pixman-1 -I/usr/include/freetype2 -I/usr/include/libpng12
lnostdal@blackbox:~/programming/sbcl-git$ pkg-config --cflags gtk+-2.0
-pthread -I/usr/include/gtk-2.0 -I/usr/lib/gtk-2.0/include -I/usr/include/atk-1.0 -I/usr/include/cairo -I/usr/include/gdk-pixbuf-2.0 -I/usr/include/pango-1.0 -I/usr/include/gio-unix-2.0/ -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -I/usr/include/pixman-1 -I/usr/include/freetype2 -I/usr/include/libpng12
lnostdal@blackbox:~/programming/sbcl-git$ pkg-config --cflags gtk+-2.0
-pthread -I/usr/include/gtk-2.0 -I/usr/lib/gtk-2.0/include -I/usr/include/atk-1.0 -I/usr/include/cairo -I/usr/include/gdk-pixbuf-2.0 -I/usr/include/pango-1.0 -I/usr/include/gio-unix-2.0/ -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -I/usr/include/pixman-1 -I/usr/include/freetype2 -I/usr/include/libpng12
lnostdal@blackbox:~/programming/sbcl-git$ pkg-config --cflags gtk+-2.0
-pthread -I/usr/include/gtk-2.0 -I/usr/lib/gtk-2.0/include -I/usr/include/atk-1.0 -I/usr/include/cairo -I/usr/include/gdk-pixbuf-2.0 -I/usr/include/pango-1.0 -I/usr/include/gio-unix-2.0/ -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -I/usr/include/pixman-1 -I/usr/include/freetype2 -I/usr/include/libpng12
lnostdal@blackbox:~/programming/sbcl-git$ pkg-config --cflags gtk+-2.0
-pthread -I/usr/include/gtk-2.0 -I/usr/lib/gtk-2.0/include -I/usr/include/atk-1.0 -I/usr/include/cairo -I/usr/include/gdk-pixbuf-2.0 -I/usr/include/pango-1.0 -I/usr/include/gio-unix-2.0/ -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -I/usr/include/pixman-1 -I/usr/include/freetype2 -I/usr/include/libpng12
lnostdal@blackbox:~/programming/sbcl-git$ pkg-config --cflags gtk+-2.0
-pthread -I/usr/include/gtk-2.0 -I/usr/lib/gtk-2.0/include -I/usr/include/atk-1.0 -I/usr/include/cairo -I/usr/include/gdk-pixbuf-2.0 -I/usr/include/pango-1.0 -I/usr/include/gio-unix-2.0/ -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -I/usr/include/pixman-1 -I/usr/include/freetype2 -I/usr/include/libpng12
lnostdal@blackbox:~/programming/sbcl-git$
..
..

pythonsyntax
October 22nd, 2010, 04:04 AM
i said i can't find the headers when i try to compile in gtk+

Barrucadu
October 22nd, 2010, 12:11 PM
How are you compiling?

MadCow108
October 22nd, 2010, 12:27 PM
don't write gui's in C, especially when you are unfamiliar with the C compilation process.
Your just making everything more complicated for no gain.

use a higher level language like python, perl, ruby or even c++ for the gui and the performance critical backend can still be C.

For your problem read the links provided by others here and the forum stickies...

pythonsyntax
October 22nd, 2010, 01:05 PM
gcc -Wall -g helloworld.c -o helloworld `pkg-config --cflags gtk+-2.0` \
`pkg-config --libs gtk+-2.0`




and how do you run the file after you compile it?

Simian Man
October 22nd, 2010, 04:11 PM
don't write gui's in c, especially when you are unfamiliar with the c compilation process.
Your just making everything more complicated for no gain.

+1