Question

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

Was it helpful?

Solution

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

OTHER TIPS

  1. You can call vala-generated code from C++, but it's plain C and quite pain to use from C++.
  2. Vala can only call C code, so you'd have to wrap all your C++ code in extern "C" one.
  3. Using Gtk from C++ via Gtkmm is no harder than using it from Vala and Qt is not any harder either.
  4. Qt is the only really cross-platform option. Gtk now works natively on MacOS X, but is still not as stable. And Qt also works on most smart-phone platforms, Gtk does not.
  5. Vala is not that much like C# and has it's share of quriks.

In general I'd recommend using Qt instead.

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 …

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

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top