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.
Hello folks,
I am writing a GUI to a set of programs of mine. My main requirement is that it should work across several platforms (all UNIXs and Linux), not the beauty of the interface. The interface is also very simple (a few menus, and buttons), so I do not need advanced features of the toolkits. Should I use any toolkit (if so, which would be convenient across several platforms)?
My programs are completely ANSI C compliant, so porting them across UNIXs and Linux should be pretty simple. I thought of writing using just the Xlibs, without any toolkit. Would this be frowned upon? Also I would be happy to know if writing using only Xlibs would help overcome portability problems or if there are UNIX platforms that do not support Xlibs
Regards,
Maidros
All UNIX programs support XLib, and there's probably implementations for Windows too.
Don't use XLib. Take a look at the API; it's very low-level. You have routines to draw primative shapes, copy graphics around and capture mouse and keyboard events, and that's about it.
Qt is a very good cross-platform widget set that uses C++ (together with a metacompiler) and makes creating GUIs easy. There are also pleanty of cross-platform APIs out there that you could use. One such is SDL (www.libsdl.org) which is also quite low-level but at least takes advantage of hardware acceleration transparantly.
Originally posted by rjlee All UNIX programs support XLib, and there's probably implementations for Windows too.
Don't use XLib. Take a look at the API; it's very low-level. You have routines to draw primative shapes, copy graphics around and capture mouse and keyboard events, and that's about it.
Qt is a very good cross-platform widget set that uses C++ (together with a metacompiler) and makes creating GUIs easy. There are also pleanty of cross-platform APIs out there that you could use. One such is SDL (www.libsdl.org) which is also quite low-level but at least takes advantage of hardware acceleration transparantly.
Distribution: Solaris 11.4, Oracle Linux, Mint, Debian/WSL
Posts: 9,789
Rep:
How wide does "all UNIXs" mean for you ?
I guess that for a new project, you mean all Unixes that are still widely used:
Gnu/Linux major distributions (RH/Debian/Suse/...)
FreeBSD/OpenBSD
MacOS/X
Solaris
AIX
HP-UX
Irix
and probably a couple of others I'm missing.
There's a free open source motif clone available at: http://www.lesstif.org/
that should work with all the O/S I listed.
Motif is included with Solaris, HP-UX and AIX (as part of CDE).
You'll find also information about the original motif, and specially the fact that it is now free to download/use on open source platforms: http://www.opengroup.org/openmotif/datasheet.html
Originally posted by jlliagre How wide does "all UNIXs" mean for you ?
I guess that for a new project, you mean all Unixes that are still widely used:
Gnu/Linux major distributions (RH/Debian/Suse/...)
FreeBSD/OpenBSD
MacOS/X
Solaris
AIX
HP-UX
Irix
and probably a couple of others I'm missing.
Well, the platforms on which my program is expected to work include
GNU/ Linux (RH, Debian, Slackware, and other major ones)
*BSD (FreeBSD, OpenBSD, NetBSD)
AIX
Solaris
Irix
- that would be all, I think.
Quote:
There's a free open source motif clone available at: http://www.lesstif.org/
that should work with all the O/S I listed.
Motif is included with Solaris, HP-UX and AIX (as part of CDE).
You'll find also information about the original motif, and specially the fact that it is now free to download/use on open source platforms: http://www.opengroup.org/openmotif/datasheet.html
Thanks - will check about the lesstif, and what platforms it is supported on. Thanks for the info.
Regards,
Maidros
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.