开发者

Cross Platform C library for GUI Apps? [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.

We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.

开发者_高级运维

Closed 6 years ago.

The community reviewed whether to reopen this question 5 months ago and left it closed:

Original close reason(s) were not resolved

Improve this question

Free of charge, simple to learn/use, Cross Platform C library for GUI Apps? Am I looking for Qt?

Bonus question: Can I develop with the said library/toolkit on Mac then recompile on PC/Linux?

Super Bonus Question: Link to tutorial and/or download of said library.

The truth is that I'm in the process of catching up on the C family (coming from web development - XHTML/PHP/MySQL) to learn iPhone development.

I do understand that C is not C++ or ObjectiveC but I want to keep the learning curve as simple as possible. Not to get too off topic, but I am also on the lookout for good starter books and websites. I've found this so far.

I'm trying to kill many birds with one stone here. I don understand that there are platform specific extensions, but I will try to avoid those for porting purposes The idea is that I want to write the code on one machine and just compile thrice. (Mac/Win/Linux) If Objective C will compile on Windows and Linux as well as OS X then that's good. If I must use C++, that's also fine.


If you are looking for a C++ library, then Qt basically does what you are looking for. If you want to stick to pure C, then Qt is not an option.

As a C framework you could use GTK+, it works on Linux, Windows and OS X.


Take a look at the IUP Toolkit. It is written largely in C, and is also easily bound to Lua.


To complete this post Allegro has to be here =)

http://www.talula.demon.co.uk/allegro/ Allegro Game Library, have many graphics functions and a basic GUI library

And an explicit gui (and very simple) Allegro based library

http://cgui.sourceforge.net/index.html

Both multi-platform


Another option is Tk, which is a GUI library written in C. It comes with Tcl, a scripting language also written in C. These were designed from the ground up to be embedded in C programs.


One that I have considered using was the EFL, as it's quite fast, simple, small, but powerful. I would recommend diving into Elementary, their simplest GUI toolkit, and then later on, once you get comfortable with it, move to EDJE, which is not as simple, but much more powerful.


Qt is a C++ library. Other cross platform libraries that you might consider are wxWidgets (C++), and GTK (C).

All three of the presented libraries are fully cross platform. You can also look at Tcl/Tk, but that's a toolkit :).


You tagged this question about qt, which is a tag I follow. However, you are also asking with regards to c programming.

If for some strange (or domain-enforced) reason you feel you must use C and not C++, then Qt is not for you. It was designed from the ground-up as a C++ library.

Yet I'd strongly suggest questioning why your project would need to be in C. There are many benefits to C++, and the idea that C performs intrinsically better is mostly a myth. For some hard data on that, check out Bjarne Stroustrup's Learning C++ as a New Language.

If you must stick to C then there's always GTK. The underlying API of GTK+ is C, but bindings also exist for C++ called GTKmm. I'm not a big fan of it from a design perspective, but historically powered the Gnome desktop (Ubuntu's default)...and Google chose it for their version of Chrome for Linux. So it has some cred and support there.

But do note that Ubuntu is choosing Qt5 to implement their next version of "Unity" in the desktop:

https://askubuntu.com/questions/281092/why-is-canonical-choosing-qt-over-gtk-for-unitys-next-generation


EDIT: You added:

If I must use C++, that's also fine.

"Must" is a strong word, but there is practically no comparison between C++/Qt vs. C/GTK. And the latter is becoming a thing of history.


Take a look at the Ecere SDK. It offers a cross-platform GUI toolkit, and gives you eC, an object-oriented language derived from C (with all of its functionality) that is just great for building GUIs.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜