跨平台C库的GUI应用?

时间:2022-11-29 12:14:15

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

免费,简单的学习/使用,跨平台C库的GUI应用程序?我在找Qt吗?

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

附加问题:我可以在Mac上使用上述库/工具包进行开发,然后在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.

事实是,我正在追赶C族(来自web开发——XHTML/PHP/MySQL)来学习iPhone开发。

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.

我知道C不是c++或objective - ec,但我想让学习曲线尽可能简单。不要太离谱,但我也在寻找好的入门书籍和网站。到目前为止我发现了这个。

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.

我想在这里一举两得。我不理解有特定于平台的扩展,但出于移植目的,我将尽量避免这些扩展,我的想法是在一台机器上编写代码,然后编译三次。(Mac/Win/Linux)如果Objective C能在Windows和Linux以及OS X上编译,那就很好了。如果我必须使用c++,那也没问题。

9 个解决方案

#1


16  

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.

如果您正在寻找一个c++库,那么Qt基本上完成了您正在寻找的工作。如果您想坚持使用纯C,那么Qt不是一个选项。

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

作为一个可以使用GTK+的C框架,它可以在Linux、Windows和OS X上工作。

#2


9  

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

看看IUP工具包。它主要写在C语言中,也很容易被绑定到Lua。

#3


3  

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

Qt是一个c++库。您可能考虑的其他跨平台库有wxWidgets (c++)和GTK (C)。

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

所有三个提供的库都是完全跨平台的。您也可以查看Tcl/Tk,但这是一个工具包:)。

#4


3  

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.

另一种选择是Tk,它是用C编写的GUI库,附带了Tcl,也是用C编写的脚本语言。

#5


3  

To complete this post Allegro has to be here =)

要完成这个post Allegro必须在这里=)

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

http://www.talula.demon.co.uk/allegro/allegro Game库具有许多图形功能和一个基本的GUI库

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

以及一个基于Allegro的显式gui(非常简单)库

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

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

Both multi-platform

两个多平台

#6


3  

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.

我曾经考虑过使用英语作为外语,因为它非常快,简单,小,但是很强大。我建议深入到他们最简单的GUI工具包——Elementary,然后,一旦你熟悉了它,就把它移到EDJE,它不是那么简单,而是更强大。

#7


2  

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.

看看Ecere SDK。它提供了一个跨平台的GUI工具包,并为您提供了来自C的面向对象语言(具有所有功能),这对构建GUI非常有用。

#8


1  

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

你给这个关于qt的问题贴上了标签,这是我关注的一个标签。然而,您也在询问c编程。

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.

如果由于某些奇怪的(或域强制的)原因,您认为必须使用C而不是c++,那么Qt不适合您。它的设计初衷是作为一个c++库。

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.

然而,我强烈建议您质疑为什么您的项目需要在C中,c++有很多好处,而认为C在本质上表现更好的想法基本上是一个神话。有关这方面的一些硬数据,请参阅Bjarne Stroustrup的《学习c++作为一门新语言》。

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.

如果你必须坚持使用C,那么总有GTK。GTK+的底层API是C,但是也存在称为GTKmm的c++绑定。从设计的角度来看,我不太喜欢它,但从历史上看,它支持Gnome桌面(Ubuntu的默认)……谷歌为他们的Linux版本选择了它。所以它有一些信誉和支持。

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

但是请注意,Ubuntu正在选择Qt5来实现他们在桌面的下一个版本的“Unity”:

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

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.

如果我必须使用c++,那也没问题。

"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.

“Must”是一个强烈的词,但是实际上在c++ /Qt和C/GTK之间并没有可比性。而后者正在成为历史。

#9


0  

Yet another option, although limited and maybe ugly to some people: AGUI

另一个选择,尽管对某些人来说是有限的,也可能是丑陋的:AGUI

Manual: http://intron-trans.hu/agui.html

手动:http://intron-trans.hu/agui.html

Windows binaries: http://intron-trans.hu/agui-bin-mingw-v090b.zip

Windows二进制文件:http://intron-trans.hu/agui-bin-mingw-v090b.zip

Source code: http://intron-trans.hu/agui-src-v090b.zip

源代码:http://intron-trans.hu/agui-src-v090b.zip

#1


16  

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.

如果您正在寻找一个c++库,那么Qt基本上完成了您正在寻找的工作。如果您想坚持使用纯C,那么Qt不是一个选项。

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

作为一个可以使用GTK+的C框架,它可以在Linux、Windows和OS X上工作。

#2


9  

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

看看IUP工具包。它主要写在C语言中,也很容易被绑定到Lua。

#3


3  

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

Qt是一个c++库。您可能考虑的其他跨平台库有wxWidgets (c++)和GTK (C)。

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

所有三个提供的库都是完全跨平台的。您也可以查看Tcl/Tk,但这是一个工具包:)。

#4


3  

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.

另一种选择是Tk,它是用C编写的GUI库,附带了Tcl,也是用C编写的脚本语言。

#5


3  

To complete this post Allegro has to be here =)

要完成这个post Allegro必须在这里=)

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

http://www.talula.demon.co.uk/allegro/allegro Game库具有许多图形功能和一个基本的GUI库

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

以及一个基于Allegro的显式gui(非常简单)库

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

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

Both multi-platform

两个多平台

#6


3  

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.

我曾经考虑过使用英语作为外语,因为它非常快,简单,小,但是很强大。我建议深入到他们最简单的GUI工具包——Elementary,然后,一旦你熟悉了它,就把它移到EDJE,它不是那么简单,而是更强大。

#7


2  

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.

看看Ecere SDK。它提供了一个跨平台的GUI工具包,并为您提供了来自C的面向对象语言(具有所有功能),这对构建GUI非常有用。

#8


1  

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

你给这个关于qt的问题贴上了标签,这是我关注的一个标签。然而,您也在询问c编程。

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.

如果由于某些奇怪的(或域强制的)原因,您认为必须使用C而不是c++,那么Qt不适合您。它的设计初衷是作为一个c++库。

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.

然而,我强烈建议您质疑为什么您的项目需要在C中,c++有很多好处,而认为C在本质上表现更好的想法基本上是一个神话。有关这方面的一些硬数据,请参阅Bjarne Stroustrup的《学习c++作为一门新语言》。

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.

如果你必须坚持使用C,那么总有GTK。GTK+的底层API是C,但是也存在称为GTKmm的c++绑定。从设计的角度来看,我不太喜欢它,但从历史上看,它支持Gnome桌面(Ubuntu的默认)……谷歌为他们的Linux版本选择了它。所以它有一些信誉和支持。

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

但是请注意,Ubuntu正在选择Qt5来实现他们在桌面的下一个版本的“Unity”:

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

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.

如果我必须使用c++,那也没问题。

"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.

“Must”是一个强烈的词,但是实际上在c++ /Qt和C/GTK之间并没有可比性。而后者正在成为历史。

#9


0  

Yet another option, although limited and maybe ugly to some people: AGUI

另一个选择,尽管对某些人来说是有限的,也可能是丑陋的:AGUI

Manual: http://intron-trans.hu/agui.html

手动:http://intron-trans.hu/agui.html

Windows binaries: http://intron-trans.hu/agui-bin-mingw-v090b.zip

Windows二进制文件:http://intron-trans.hu/agui-bin-mingw-v090b.zip

Source code: http://intron-trans.hu/agui-src-v090b.zip

源代码:http://intron-trans.hu/agui-src-v090b.zip