23

I have a project in C language and the teacher ordered to make a Gui of project. I can only use C or C++ for the GUI part.

Can anyone please suggest me Some easy open source Graphics Library Tutorial because this will be my first ever GUI.

thanks

Donal Fellows
  • 133,037
  • 18
  • 149
  • 215
devoidfeast
  • 829
  • 3
  • 12
  • 22
  • 3
    Your teacher told you to write a GUI without any kind of direction? That's very odd. GUIs especially in C and C++ are quite complicated. – Falmarri Dec 31 '10 at 21:22

3 Answers3

24

The two most usual choices are GTK+, which has documentation links here, and is mostly used with C; or Qt which has documentation here and is more used with C++.

I posted these two as you do not specify an operating system and these two are pretty cross-platform.

hsynydn
  • 27
  • 5
houbysoft
  • 32,532
  • 24
  • 103
  • 156
  • I changed GTK to GTK+ since that is more proper. Also, note that while GTK+ is a C API, there are wrappers for *many* programming languages. – unwind Feb 08 '13 at 10:50
11

My favourite UI tutorials all come from zetcode.com:

These are tutorials I'd consider to be "starting tutorials". The example tutorial gets you up and going, but doesn't show you anything too advanced or give much explanation. Still, often, I find the big problem is "how do I start?" and these have always proved useful to me.

Jan Bodnar
  • 10,969
  • 6
  • 68
  • 77
3

You can also have a look at FLTK (C++ and not plain C though)

FLTK (pronounced "fulltick") is a cross-platform C++ GUI toolkit for UNIX®/Linux® (X11), Microsoft® Windows®, and MacOS® X. FLTK provides modern GUI functionality without the bloat and supports 3D graphics via OpenGL® and its built-in GLUT emulation.

FLTK is designed to be small and modular enough to be statically linked, but works fine as a shared library. FLTK also includes an excellent UI builder called FLUID that can be used to create applications in minutes.

Here are some quickstart screencasts

[Happy New Year!]

Community
  • 1
  • 1
epatel
  • 45,805
  • 17
  • 110
  • 144