ProgrammingThis forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
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.
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 ^_^.
Distribution: OpenSuse 10.2, Slackware 11, Solaris 10
Posts: 415
Rep:
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
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...).
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)
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.
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)
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.
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.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.