Visit Jeremy's Blog.
Go Back > Forums > Non-*NIX Forums > Programming
User Name
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.


  Search this Thread
Old 09-24-2004, 01:46 AM   #1
Registered: Sep 2004
Location: Hyderabad.
Posts: 83

Rep: Reputation: 15
creating gui/interace using c

i am new to linux. I want to create a gui or an interface in c. From that interface i want to take the values from the user and i want to store that values in a file for later processing. I want to know what are various libraries availlable in linux to develop such interfaces.

Thanx in advance.
Old 09-24-2004, 03:36 AM   #2
Senior Member
Registered: Jul 2004
Distribution: Ubuntu 7.04
Posts: 1,991

Rep: Reputation: 76
The most primitive library for GUI development (known as a “widget set” or “widget toolkit”) is Xlib. It's fast but it's quite hard to use (or find good non-expensive documentation on).

The most common widget set in C in the gtk library, originallally used as the toolkit for the GNU Image Manipulator Program, now also used for the GNOME project.

If you're prepared to try C++ then you might want to look at Qt or the higher-level libkde (which is built on Qt) that is used by KDE. Java is also a nice language for built-in GUI support.

There's also ncurses, which is a terminal-based (text) widget library for creating user interfaces that work very much like windowed interfaces.

That's all that springs to mind; I know I've left quite a few out.

Hope that helps,

— Robert J. Lee
Old 09-24-2004, 04:40 AM   #3
Registered: Sep 2004
Location: Hyderabad.
Posts: 83

Original Poster
Rep: Reputation: 15
Robert thanx for u reply. It provided me some information. And one more help i needed from u. I want to know which one is better option i.e. either ncurses or xlibc.

Old 09-24-2004, 07:14 AM   #4
Registered: Jan 2004
Location: Munich
Distribution: SuSE 9.2, 10.2, 10.3, knoppix
Posts: 276

Rep: Reputation: 31
Ncurses isn't really graphical. Instead it provides a framework which lets you work
with text based windows in a shell. In other words: Will work with any decent
linux box *without* X server installed.
Xlib is graphical, and if you chose it you have the advantage that you don't need
GTK or QT or any other library installed, *but* doesn't provide you with windows,
widgets and the like (it's more like DirectDraw, you can open a screen, draw lines,
points or arcs on it and move/copy rectangular areas, but that's it). It will take
you months or even years, if you go to develop a gui with Xlib only.

IMHO if you just want to provide a user with a means to graphically enter a set of
values, GTK is the fastest way to go.

If you can do without graphics and stick to text only, take ncurses (not very hard
to understand, either)


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Creating a GUI in Linux Ian D Programming 14 10-24-2005 05:18 AM
[Ubuntu GUI] Changing GUI from Gnome to wmaker MangaManiac Linux - Laptop and Netbook 8 05-08-2005 03:17 PM
Isn't Windows 95 or 98 a better GUI solution for old machines than an old Linux GUI lynchmob09 General 10 04-20-2004 01:24 AM
which web-based email interace kubicon Linux - Networking 2 02-01-2004 11:57 PM
Creating a GUI without QI, Glade, etc mymojo Programming 4 10-20-2003 11:32 PM > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 06:26 PM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration