Thread: Cross Platform appplication - porting easy?

  1. #1
    Registered User
    Join Date
    Dec 2007

    Cross Platform appplication - porting easy?

    I'm going to write a cross-platform application on Windows and Mac.
    I must use C++ to finish it.
    However I have no experience in programming in Mac and I want to start by using Visual C++ to write the Windows version first. Then port it to Mac.
    May I know is it easy to port?
    and What can I do to make the port more easily?
    Thanks a lot.

  2. #2
    and the hat of int overfl Salem's Avatar
    Join Date
    Aug 2001
    The edge of the known universe
    Use a cross-platform IDE like

    Use a cross-platform GUI toolkit like

    Know what the standard language provides, and what is specific to your OS.

    If you need to use OS features, then create wrapper functions / classes in your code which provide an interface. Encapsulating OS dependencies in a few places makes it much easier to port.
    If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
    If at first you don't succeed, try writing your phone number on the exam paper.

  3. #3
    Registered User
    Join Date
    Oct 2006
    You may want to check out Qt. Note that Qt4 is free if you are developing free software. For my typically small scale projects, I don't need to change even a single line when "porting" from one OS to the other (linux to windows in my case).
    IMHO a very well designed and simple to use toolkit, which I would suggest using even if you are developing windows only apps.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. List All files recursively cross platform
    By umen242 in forum C++ Programming
    Replies: 15
    Last Post: 05-07-2008, 01:20 PM
  2. Cross platform XML library
    By Josh Kasten in forum C++ Programming
    Replies: 2
    Last Post: 04-09-2007, 04:04 PM
  3. load gif into program
    By willc0de4food in forum Windows Programming
    Replies: 14
    Last Post: 01-11-2006, 10:43 AM
  4. Question..
    By pode in forum Windows Programming
    Replies: 12
    Last Post: 12-19-2004, 07:05 PM
  5. cross platform game programming
    By xddxogm3 in forum Game Programming
    Replies: 13
    Last Post: 08-22-2004, 09:40 AM