LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Programming (https://www.linuxquestions.org/questions/programming-9/)
-   -   Cross Platform GUI development (https://www.linuxquestions.org/questions/programming-9/cross-platform-gui-development-337536/)

Artik 06-27-2005 03:06 AM

Cross Platform GUI development
 
Hello,

I want to create some C/C++ programs that use GUI that will run on both Linux and MS Windows platforms.

But as far as I know QT or GTK are supported only by Linux/UNIX and MFC only MS Windows.

The question is:

Is there cross-platform libraries that GUI can be build for both platforms?

Is it correct that there is GTK libraries ported to Windows?

If I don't mistake Gimp for windows use some kind of such things...

Is there any problems with such development?

Is it better to work on Java for cross platoform GUI
However it is less preferred because of lower perfomance of Java in comparison with C/C++ for sophisticated calculations.

Mega Man X 06-27-2005 03:15 AM

GTK Runtime library is available for Windows and that's exactly how The Gimp and Gaim actually runs under Windows. As far as I know, however, you can not develop GTK applications in Windows... you will need gcc to compile the applications (I could be wrong in this one). I never worked with QT, but it has a slightly different license. It was not even free for Windows before, but it looks like now it is. Check their page first.

Java is definitely a good choice too. The performance is not as bad as one would think and it can look pretty damn good if you ask me. Just check out applications as Eclipse, jEdit or Limewire as see how they look like...

I would be between Java and GTK/gcc for this question... slightly toward Java, because I love the language, but C is just great too, Heck the very best OS in the Universe is written in C ^_^.

irfanhab 06-27-2005 03:16 AM

Quote:

I want to create some C/C++ programs that use GUI that will run on both Linux and MS Windows platforms.

But as far as I know QT or GTK are supported only by Linux/UNIX and MFC only MS Windows.
Well there you have it Qt allows you to do cross-platform GUI programming, and besides MFC is found in every Windows version after Win98SE I think, on extra runtimes required

Artik 06-27-2005 03:22 AM

Quote:

Originally posted by Megaman X

...
The performance is not as bad as one would think and it can look pretty damn good if you ask me.
...

Thanks a lot...

I mean GUI has secondary role... It should be heavy image processing/calculations system with some GUI... So I'd prefere to use C/C++ for these role.

Quote:

...
you will need gcc to compile the applications
...
You mean use cygwin platform for gcc to compile under MS Windows?

Artik 06-27-2005 04:56 AM

Making some google I've read about another toolkit

wxWidgets

How is it?

lowpro2k3 06-27-2005 10:05 AM

It looks like you can download the GTK development environment for Win32 (with libraries and headers), so I dont see any reason you couldnt set your windows INCLUDE path to pick up the new libraries and headers (ie: visual c++, bloodshed, etc...).

http://www.dropline.net/gtk/download.php

PerfectReign 06-27-2005 10:22 AM

Quote:

Originally posted by Megaman X
Heck the very best OS in the Universe is written in C ^_^.
You mean Windows NT? ;)

Mega Man X 06-27-2005 12:51 PM

LOL, that's the one ;)

frandalla 06-27-2005 03:40 PM

Quote:

Originally posted by Artik
Making some google I've read about another toolkit

wxWidgets

How is it?

WxWidgets is a cross-gui that has its version for C++. Nice API, nice to play with.
http://www.wxwidgets.org/

Take a look, you may like it! =D

Just to add, some nice well-known piece of software is made with wxwidgets like Audacity, an audio editing software, very good indeed. (just got to know this in their website)

lowpro2k3 06-27-2005 03:49 PM

Quote:

Originally posted by frandalla
WxWidgets is a cross-gui that has its version for C++. Nice API, nice to play with.
http://www.wxwidgets.org/

Take a look, you may like it! =D

Just to add, some nice well-known piece of software is made with wxwidgets like Audacity, an audio editing software, very good indeed. (just got to know this in their website)

Thanks for that, I like C++ a bit better than C, so GTK wasnt my perfect cup of tea, and I havent looked into QT as much as I should have, but I've heard things about licensing and load times that I wanted to steer away from. This might be the perfect API for me to work with, I'm gonna check it out when I get a chance.

frandalla 06-27-2005 03:55 PM

Quote:

Originally posted by lowpro2k3
Thanks for that, I like C++ a bit better than C, so GTK wasnt my perfect cup of tea, and I havent looked into QT as much as I should have, but I've heard things about licensing and load times that I wanted to steer away from. This might be the perfect API for me to work with, I'm gonna check it out when I get a chance.
Yes. QT has restrictions to commercial development. WxWidgets is GPL'd (as far as I know! =P)

stonehurstX11 06-27-2005 05:30 PM

Quote:

Originally posted by lowpro2k3
Thanks for that, I like C++ a bit better than C, so GTK wasnt my perfect cup of tea, and I havent looked into QT as much as I should have, but I've heard things about licensing and load times that I wanted to steer away from. This might be the perfect API for me to work with, I'm gonna check it out when I get a chance.
There are bindings to the C++ language for GTK. The wrapper library is called GTKmm (http://gtkmm.org), and personally I think that the API is very well organized and clean. I use it for practically all my GUI needs on both Win32 and Linux. ;)

lowpro2k3 06-27-2005 06:20 PM

Quote:

Originally posted by stonehurstX11
There are bindings to the C++ language for GTK. The wrapper library is called GTKmm (http://gtkmm.org), and personally I think that the API is very well organized and clean. I use it for practically all my GUI needs on both Win32 and Linux. ;)
Thanks, I'll look into that as well.

dop 06-28-2005 09:07 AM

Use java for your gui and have everything else running through JNI... I 've used it and it is OK...

frandalla 06-28-2005 02:57 PM

Quote:

Originally posted by dop
Use java for your gui and have everything else running through JNI... I 've used it and it is OK...
hmm. As he said before before I don't think java is as well suited as C/C++ for heavy load software. :rolleyes:


All times are GMT -5. The time now is 02:37 AM.