C++ cross-platform framework for mobile app development

22,920

Solution 1

I'm sure a lot of people have this question as well, so read this if you'd really like to know the answer. Marmalade is probably the BEST solution. Code once, deploy to mobile devices, desktops, even some TV's. Many popular games have been created with Marmalade.

Extensive games like:

  • Lara Croft and the Guardian of Light

  • Call of Duty: World at War Zombies

But also simple games like:

  • draw something.

  • Doodle Jump

They've added a free package. You can create your game for free and if you want to get rid of the ad splash screen, it's $150,- per year for mobile devices or $500,- per year for other devices as well.

A big advantage is the native speed. It doesn't matter what people claim about other languages like javascript or java (and unfortunately Qt, which of course isn't a language but you know what I mean) running as fast as C or C++. It's simply not true. For simple applications this is of course not important, but when you're looking at (simple) games, this is crucial.

At the moment version 7.3 is available, but this version has a problem with the ARM emulator. I would download 7.0.

Whether you choose Marmalade or not, make sure you read the documentation. You don't want to end up missing some functionality and switch to another option when you're almost finished.

Solution 2

There ARE solutions for C++ cross-platform development for Android and iPhone, despite what other answers say here.

The best is probably Marmalade, but it's expensive, so only useful for commercially viable apps: https://www.madewithmarmalade.com/

Then there's MoSync, which you can use for free. Unfortunately they went bankrupt last year, so there's no ongoing support. Still, might be worth a look depending on your needs. http://www.mosync.com

OpenFrameworks is one I hadn't seen, so thanks Rodrigo for that answer: http://openframeworks.cc/

Solution 3

I've looked into portable code between Android and iOS before and I don't think it's possible. To release apps into the Android market it needs to be in Java, and anything with a GUI on iOS needs to use Objective-C. You might be able to have partial portable C++ layer, but in reality it's probably quicker to write the same app twice in Java and Obj-C than it would be to write it once in C++ as a portable solution.

Qt or Wx-Widgets might have some support, but I have not looked into mobile platforms for these, and I suspect the reality is that Apple, Microsoft and Oracle want you to be tied into their technologies these days and have no incentive to make things portable.

EDIT: I noticed a recent down vote, but the person was not willing to leave a comment, so let me explain further. C# and Java provide a complete framework that allows code to be written much quicker using well documented classes and libraries, especially when dealing with user interfaces. C++ on the other hand relies on many open source projects that take a lot of effort to get functioning on multiple platforms, and much time is spent dealing with subtle platform problems. My suggestion was simply that it might be easier to pick a language better suited to the platform you are dealing with, as C++ tends to be lower level than other languages, the syntax can seem verbose and many hours can be wasted trying to make things work that you would expect to just work, and unfortunately documentation for many open source projects is poor. Maybe this can be considered to be an opinion, but then the shift from C++ to C# or Java commercially might also indicate that I'm not the only one believing this.

Solution 4

You can take a look on openFrameworks, maybe it fits on your needs:

http://openframeworks.cc/about/

Share:
22,920

Related videos on Youtube

John
Author by

John

Updated on June 08, 2020

Comments

  • John
    John almost 4 years

    I'm planning on developing mobile application for both iOS and Android and I want to use C++ for the development.

    Which cross-platform framework is available for building mobile application using the C++ language.

    • Steve M
      Steve M almost 10 years
      games or apps? I'm not sure there is a C++ cross platform framework for regular apps. You can mix C++ and Objective C, and you can compile C++ with the Android NDK, so you can have some cross platform code, but this isn't a framework in the way you are thinking.
    • Gregor Brandt
      Gregor Brandt over 9 years
      Try Embarcaderos C++ Builder with the mobile add-on. embarcadero.com. Windows 32, Windows 64, OS X, Android, iOS development with one code base.
    • Creative Coder
      Creative Coder over 9 years
      Qt is a great choice, with the power of QML you can do great things
  • Creative Coder
    Creative Coder over 9 years
    There is a C++ great solution which is Qt and QML
  • JMRC
    JMRC about 9 years
    I never read your edit, sorry for not explaining the down vote. I did this because there are companies that have done a great job creating an abstraction layer. Marmalade is an example, I recently figured out that cocos2d works with C++ as well. They're becoming better and completer every day, but are actually already very good.
  • Admin
    Admin about 9 years
    Having looked at Marmalade, it highlights the problems that C++ faces against other environments like C# and Java, where those languages get a cross platform framework that can do much of this for free, where as C++ becomes expensive when businesses need to start investing in these 3rd party frameworks to deliver a similar end result. This was the point I was really making, so there might be libraries out there, but the cost becomes the barrier to entry for many companies.
  • JMRC
    JMRC about 9 years
    You can use the free version until you've completely finished the application (what I'm doing now). Than 150 per year. The free version has a splash screen. I think cocos2d is free, but than again I've never used it before.
  • Admin
    Admin about 9 years
    Might be viable for a home project or small team, but working with hundreds of C++ engineers working on many projects shared from a common code base, companies decide to bolt multiple free open source projects together and add extra layers to achieve a similar result without the need to pay yearly fees. It might be a false economy, but it's also the reality of software departments with limited budgets.