Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Can you program a GUI in C++ that works on both Windows and Linux operating systems?

I have been learning C++ for a while now, and so far I love it. But I have been stuck at the console application level. I have built C# programs for a few years so I love having a GUI and not do everything via console.

Console programs when compiled will work on both windows and linux, which is great. When I was searching GUI C++ tutorials I could only find tutorials for windows specific GUI applications.

So my question is this, can you program a GUI in C++ that when compiled with run on both windows and linux? If this is not possible, can someone point me to a great place to learn windows and linux GUI?

like image 226
Landin Martens Avatar asked Dec 03 '11 02:12

Landin Martens


People also ask

Is GUI possible in C?

All operating systems are written in C. So, any application, console/GUI you write in C is the standard way of writing for the operating system.

Is the Linux GUI as usable as Windows?

Some Linux distributions feature a GUI, much like Windows, allowing for ease of use for the average computer user. Linux GUI distributions are more user-friendly and do not contain all the extra "bloatware" that Windows is known to include. Examples of easier to use distributions include Ubuntu and Linux Mint.

Does Linux come with a GUI?

The desktop environment is the graphical interface on a Linux system. The default desktop environment in RedHat is provided by GNOME(GNU Network Object Modeling Environment, A GUI-based user interface for Linux and other Unix environments).


3 Answers

I suggest you to use Qt by Nokia:

http://qt.nokia.com/products/

It is free, very powerful, very easy to use, and well designed. And there is also a Visual Studio Add-in available:

http://developer.qt.nokia.com/wiki/QtVSAddin

but you can use their own cross-platform IDE called Qt Creator as well.

like image 186
vitakot Avatar answered Oct 25 '22 08:10

vitakot


You can use wxWidget library.

like image 2
BizzyDizzy Avatar answered Oct 25 '22 08:10

BizzyDizzy


Yes, you need to use a cross platform GUI toolkit like WxWidgets

like image 1
Charles Avatar answered Oct 25 '22 08:10

Charles