我该如何混淆 C++与瓦拉
我需要用 C++ 编写跨平台的 GUI 应用程序,但由于 C++ 的大多数 GUI 库都有点乏味,而且我对 C#/.NET 非常熟悉,我发现使用 GTK 的代码 Vala 代码非常有趣,并且与其他方式相比有点容易.那么我该如何将 VAlA 与 C++ 混合起来呢?我的意思是使用 VALA 作为前端,并用 C++ 编写其余部分。
I need to write GUI applications for cross platform in C++ but since most of GUI libraries for C++ are bit tedious and I am quite familiar with C#/.NET I found out code Vala codes with GTK is quite interesting and bit easy compare with other ways.so how would I mix up VAlA with C++. I meant use VALA for front end and code rest of parts in C++.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(4)
extern "C"
中。一般来说,我建议使用 Qt。
extern "C"
one.In general I'd recommend using Qt instead.
Vala 编译为 C,大量使用 GObject 类型系统。您可以使用 glibmm 来使用它,它是 C++ 中 gtkmm 的一部分。但你也可以只使用 gtkmm (即使用 GtkBuilder)然后......
Vala compiles to C making heavy use of the GObject type system. You can use this using glibmm which is part of gtkmm from C++. But you might just as well just use gtkmm (i.e. with GtkBuilder) then …
它可能无法完全回答您的问题,但如果您使用 mono 将 C# 嵌入到 C++ 中,您可以直接从 Windows 使用 GTK# (它也可以在 mac 和 linux 中编译和运行)。
然后,您将能够使用 C#/GTK# 作为前端,并使用 C++ 编写其余部分。
It may not answer your question fully, but if you use mono to embed C# into c++, you can use GTK# directly from windows (and it will compile and run in mac and linux too).
Then, you will be able to use C#/GTK# for the front end and code rest of parts in c++.
如果 QT 满足您的要求,您可以使用它。 Qt 是一个跨平台应用程序和 UI 框架,还具有用于 C++ 编程的 API。
http://developer.qt.nokia.com/doc/qt-4.8 /gettingstartedqt.html
You can use QT if it's meeting your requirements. Qt is a cross-platform application and UI framework with APIs for C++ programming as well.
http://developer.qt.nokia.com/doc/qt-4.8/gettingstartedqt.html