Using GTK+ to develope GUI for C++?

Slightdust

Member
Sep 18, 2005
172
0
0
I just got into C++ programming this semester (college freshman) so I really don't have a clue about a lot of things. For my final project, however, I want to make a program (it's like.. a schedule thing), but I want to make a graphical interface for it, so users don't have to use the terminal or command window all the time...

I heard that GTK+ does that job, but I don't know how it works at all...Can anybody point me to the right direction?

Just trying to do the "hello world" here :
http://www.gtk.org/tutorial/c39.html#SEC-HELLOWORLD

I got the source kit from their website, but I don't know how to compile with GCC or w/e...I have Dev C++ as my compiler. Can anybody walk me through?
 

aCynic2

Senior member
Apr 28, 2007
710
0
0
Originally posted by: Slightdust
but I don't want to make a graphical interface for it, so users don't have to use the terminal or command window all the time...

At present, this doesn't make sense because you poo-pooed both a graphical interface and CLI in one phrasing. You have three options:

CLI (Command-line interface)
X11 (graphical interface)
Curses/NCurses

I'm assuming you're doing this on a *nix platform.

There should be some .a files for the GTK+. These are your static libraries. *nix has its own form of dynamic linking, but I forget the extension. For now, focus on the .a files (stands for archive).

Treat them as libs. You'll link them in.

Don't use Dev-C++, use gcc. It's better supported.

Now, you do know how to work your compiler right? I mean, how to specify libs for linking and all that?

Look at this page for how to specify the command line gcc:

Compiling Hello World

Note also, if you do not own the computer you will develop and present on, and the owner does not support GTK+, you may be out of luck.

 

Slightdust

Member
Sep 18, 2005
172
0
0
oh wow.. that's a major\stupid typo.

I meant I DO want to make a GUI for it. And I actually am making this on Windows (Vista), so....
This project will be presented on my computer, and I suppose I can just include GTK+ in the package if I would distribute it.
 

aCynic2

Senior member
Apr 28, 2007
710
0
0
Originally posted by: Slightdust
oh wow.. that's a major\stupid typo.

I meant I DO want to make a GUI for it. And I actually am making this on Windows (Vista), so....
This project will be presented on my computer, and I suppose I can just include GTK+ in the package if I would distribute it.

Do you know of any successful GTK+ based applications for Vista? I ask this because Vista is so new, it may break GTK+.
 

aCynic2

Senior member
Apr 28, 2007
710
0
0
People use GTK+ for ease in cross platform transition. GTK = Gimp Toolkit. Gimp was a unix only image manipulation application, now I believe it's available for Windows as well.
 

Nothinman

Elite Member
Sep 14, 2001
30,672
0
0
If there's VC++, why do people use GTK+? Is it becuase it's easier? And where is a good tutorial site for VC++?

VC++ is closed source, GTK+ is LGPL.
 

Nothinman

Elite Member
Sep 14, 2001
30,672
0
0
Software written with it is open source and you can still link closed source software against it. Is your google broken?