Thread: C++ Phone App Development

  1. #1
    Registered User
    Join Date
    Apr 2013
    Posts
    56

    C++ Phone App Development

    Hi All,

    Excuse me if I am posting this in the wrong area. I am an embedded C programmer and I am just about to develop an app for Android/ IOS. I would like to develop this in C++ or C. Reading the internet, it is hard to get an understanding of what is a good cross development environment to start with. In over words, write one piece of code and this works on both Android and IOS. I notice lots of environment are targeted to C++ games development.

    Can anybody give there feedback, good or bad on where is a good place to start, what everybody seems to be using, and can I get C++ feedback on this site when I start development. I am starting from zero, and I know this forum is very much on the money when it comes to development.

    Look forward to your reply.

    Many thanks.

    Rocketman46

  2. #2
    (?<!re)tired Mario F.'s Avatar
    Join Date
    May 2006
    Location
    Ireland
    Posts
    8,446
    I don't think there is a cross platform environment for Android/IOS development in either C or C++. You will need to maintain two forks.

    For Android, you make use of the Android NDK toolset. There's a frontend to this toolset if you are developing in Windows with Visual Studio. You will not require cygwin anymore. But I can't remember the name. For iOS you are better off programming in Objective-C. It's easy to learn (or so I'm told) if you already know C or C++. Any C and C++ backend you need to program for iOS can be accessed by Objective-C own C/C++ hooks.

    Given the differences between both platforms, and the resource limitations typical of embed development, there may never be a reliable and performant cross platform library for them.
    Last edited by Mario F.; 11-28-2015 at 03:29 AM.
    Originally Posted by brewbuck:
    Reimplementing a large system in another language to get a 25% performance boost is nonsense. It would be cheaper to just get a computer which is 25% faster.

  3. #3
    C++まいる!Cをこわせ!
    Join Date
    Oct 2007
    Location
    Inside my computer
    Posts
    24,654
    I've heard that typically cross platform apps tend to use C++ for the core logic and platform-specific language/API for the frontend and some third-party layer for interfacing between the core/backend and the frontend. This allows most of the code to be written in C++ which is portable across many platforms. This approach sounds reasonable to me.
    Quote Originally Posted by Adak View Post
    io.h certainly IS included in some modern compilers. It is no longer part of the standard for C, but it is nevertheless, included in the very latest Pelles C versions.
    Quote Originally Posted by Salem View Post
    You mean it's included as a crutch to help ancient programmers limp along without them having to relearn too much.

    Outside of your DOS world, your header file is meaningless.

  4. #4
    Registered User
    Join Date
    Apr 2013
    Posts
    56
    Hi Mario F & Elysia,

    Thanks for your input. I have done lots of reading and I found the below link listing the best 10 cross platform compilers. Numbers #4 cocos2d, #6 corona and #qt look interesting. My project in short is to use the google map tool box and bolt into my app and use on both Android and IOS. So I understand you have not used any of the development environments in the below link, would you risk going for one of those, or go the route mentioned by Mario F?

    Look forward to your replies.

    Cross Platform Mobile Development: 10 Best Tools

    Thanks,

    Rocketmam46

  5. #5
    (?<!re)tired Mario F.'s Avatar
    Join Date
    May 2006
    Location
    Ireland
    Posts
    8,446
    None of those are compilers. Their are, for the vast part, frameworks. And their cross-platform capabilities, you will find, are much less appealing than what is said on the label. Qt, for instance, will force you to write a lot of boilerplate branch code to accommodate visual and architectural differences in both platforms. Of that bunch, HTML5 development is perhaps your best option.

    Unless you actually have very specific needs (like game development, in which case you will definitely want Unity), you won't currently find a satisfactory framework for generic Android/iOS cross-platform development, with the exception of browser-based development in the independent HTML5 standard. But you shouldn't take my word for it. Give all them a try. You will see what I mean.
    Originally Posted by brewbuck:
    Reimplementing a large system in another language to get a 25% performance boost is nonsense. It would be cheaper to just get a computer which is 25% faster.

  6. #6
    Officially An Architect brewbuck's Avatar
    Join Date
    Mar 2007
    Location
    Portland, OR
    Posts
    7,396
    Quote Originally Posted by Elysia View Post
    I've heard that typically cross platform apps tend to use C++ for the core logic and platform-specific language/API for the frontend and some third-party layer for interfacing between the core/backend and the frontend. This allows most of the code to be written in C++ which is portable across many platforms. This approach sounds reasonable to me.
    I've done this both ways. Having two separate codebases is waaaaay easier.

    Of course, if you have a bit of truly platform-independent code, go ahead and factor that out into a native library, but in my experience, that's not the hard part.
    Code:
    //try
    //{
    	if (a) do { f( b); } while(1);
    	else   do { f(!b); } while(1);
    //}

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. new cell phone
    By lruc in forum A Brief History of Cprogramming.com
    Replies: 18
    Last Post: 12-11-2008, 02:34 PM
  2. Phone book
    By Nightmaresiege in forum C++ Programming
    Replies: 3
    Last Post: 02-09-2008, 05:12 PM
  3. Phone Book
    By FerrariF12000 in forum C Programming
    Replies: 7
    Last Post: 12-10-2003, 12:07 AM
  4. Phone conduct
    By Zewu in forum A Brief History of Cprogramming.com
    Replies: 9
    Last Post: 08-06-2003, 05:47 AM
  5. Phone Class
    By Unregistered in forum C++ Programming
    Replies: 5
    Last Post: 03-30-2002, 07:42 AM