LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
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.

Notices



Reply
 
Search this Thread
Old 06-27-2005, 03:06 AM   #1
Artik
Member
 
Registered: Apr 2005
Location: Israel
Distribution: Debian 3.1 Sarge, Ubuntu Breezy
Posts: 223

Rep: Reputation: 30
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.
 
Old 06-27-2005, 03:15 AM   #2
Mega Man X
Guru
 
Registered: Apr 2003
Location: ~
Distribution: Ubuntu, FreeBSD, Solaris, DSL
Posts: 5,339

Rep: Reputation: 63
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 ^_^.
 
Old 06-27-2005, 03:16 AM   #3
irfanhab
Member
 
Registered: Jan 2004
Location: Pakistan
Distribution: OpenSuse 10.2, Slackware 11, Solaris 10
Posts: 415

Rep: Reputation: 34
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
 
Old 06-27-2005, 03:22 AM   #4
Artik
Member
 
Registered: Apr 2005
Location: Israel
Distribution: Debian 3.1 Sarge, Ubuntu Breezy
Posts: 223

Original Poster
Rep: Reputation: 30
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?
 
Old 06-27-2005, 04:56 AM   #5
Artik
Member
 
Registered: Apr 2005
Location: Israel
Distribution: Debian 3.1 Sarge, Ubuntu Breezy
Posts: 223

Original Poster
Rep: Reputation: 30
Making some google I've read about another toolkit

wxWidgets

How is it?
 
Old 06-27-2005, 10:05 AM   #6
lowpro2k3
Member
 
Registered: Oct 2003
Location: Canada
Distribution: Slackware
Posts: 340

Rep: Reputation: 30
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
 
Old 06-27-2005, 10:22 AM   #7
PerfectReign
Member
 
Registered: Apr 2005
Location: Los Angeles
Distribution: openSUSE / Ubuntu
Posts: 294

Rep: Reputation: 33
Quote:
Originally posted by Megaman X
Heck the very best OS in the Universe is written in C ^_^.
You mean Windows NT?
 
Old 06-27-2005, 12:51 PM   #8
Mega Man X
Guru
 
Registered: Apr 2003
Location: ~
Distribution: Ubuntu, FreeBSD, Solaris, DSL
Posts: 5,339

Rep: Reputation: 63
LOL, that's the one
 
Old 06-27-2005, 03:40 PM   #9
frandalla
Member
 
Registered: Oct 2003
Location: Tokyo - Japan
Distribution: Slackware
Posts: 348
Blog Entries: 1

Rep: Reputation: 37
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)

Last edited by frandalla; 06-27-2005 at 03:42 PM.
 
Old 06-27-2005, 03:49 PM   #10
lowpro2k3
Member
 
Registered: Oct 2003
Location: Canada
Distribution: Slackware
Posts: 340

Rep: Reputation: 30
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.
 
Old 06-27-2005, 03:55 PM   #11
frandalla
Member
 
Registered: Oct 2003
Location: Tokyo - Japan
Distribution: Slackware
Posts: 348
Blog Entries: 1

Rep: Reputation: 37
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)
 
Old 06-27-2005, 05:30 PM   #12
stonehurstX11
Member
 
Registered: Dec 2003
Location: New Jersey, USA
Distribution: Ubuntu 10.04
Posts: 120

Rep: Reputation: 15
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.
 
Old 06-27-2005, 06:20 PM   #13
lowpro2k3
Member
 
Registered: Oct 2003
Location: Canada
Distribution: Slackware
Posts: 340

Rep: Reputation: 30
Smile

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.
 
Old 06-28-2005, 09:07 AM   #14
dop
LQ Newbie
 
Registered: Sep 2004
Posts: 22

Rep: Reputation: 15
Use java for your gui and have everything else running through JNI... I 've used it and it is OK...
 
Old 06-28-2005, 02:57 PM   #15
frandalla
Member
 
Registered: Oct 2003
Location: Tokyo - Japan
Distribution: Slackware
Posts: 348
Blog Entries: 1

Rep: Reputation: 37
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.
 
  


Reply


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
Cross-Platform GUI Frontend for MySQL chandru.in Linux - Software 2 08-10-2005 08:13 AM
cross platform c++ nyomon Programming 6 07-03-2005 04:24 PM
Cross platform software development ssmaitra Programming 4 05-16-2005 02:15 AM
Linux/windows Cross Platform Gui toolkit. mr_segfault Programming 7 10-31-2004 05:57 PM
Cross Platform c++ gui programming djadhav Programming 8 05-25-2004 03:15 AM


All times are GMT -5. The time now is 05:35 AM.

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