Hacker News new | ask | show | jobs
by juliangoldsmith 3503 days ago
How would C++ work for cross-platform development? Would you use a framework like Qt, or write platform-specific frontends?
2 comments

I second FlyingSnake.

It is easier to use straight C++, using a MVVM approach than Qt.

QML doesn't provide enough support for native UIs, so you end up spending time redoing native widgets on it.

Similarly Qt doesn't provide any bindings for the majority of mobile OS APIs, so you end up writing your own wrappers anyway.

In the end it is a bigger effort than using C++ libraries plus your own integration code.

Additionally in iOS and UWP, you get C++ extensions, Objective-C++ and C++/CX respectively, that make it quite easy to integrate with native APIs. Android is the outlier here with the JNI pain. Still Djinni and SafeJNI help to reduce the pain.

QT is one great option, however I've not used it so far.

I use Djinni IDL from Dropbox to create common logic in C++ and UI Specific code in iOS/Android. It's not at all beginner friendly and you need lot of patience with the setup.

Cons: complex build setup, and C++.

Pros: Blazing fast native performance, and you can easily write common business logic in c++

Start here is you wish to go that path:

http://mobilecpptutorials.com