I currently have a C++ backend that I need to connect with a GUI, and since I've never built a GUI before, I was confused on where to start.
I'm comfortable writing code in C++ and Java, so I'd prefer my GUI to be in one of those languages. Also, the GUI has to be reasonably OS independent over Windows and Linux (and hopefully, hence Macs).
Now I understand that if I use Java to do it, I'll need some wrappers to do it - but I've also heard (strictly second hand) that writing a GUI in C++ is a pain.
I don't want to rewrite too much of my backend code in Java (who does??) and I was hoping for input on:
Thanks and Cheers All :)
Have a look at Qt.
In my experience communicating between two different language runtimes is always challenging. If you have a non-trivial application to build the following often pose challenges:-
Apart from increasing one level of indirection due to wrappers, it requires a lot of thinking like circumstances where you need to pass data structures across GUI and backend etc.
For example:- Consider passing a Java String
from GUI to backend C++.
Essentially, we have to extract the characters from a Java String
object and make them available to the C++ developer without leaking the memory which holds them. This is an example of a basic problem (there are other aspects too like the encoding in which the characters are to be returned).