Cross Platform appplication - porting easy?

This is a discussion on Cross Platform appplication - porting easy? within the C++ Programming forums, part of the General Programming Boards category; I'm going to write a cross-platform application on Windows and Mac. I must use C++ to finish it. However I ...

  1. #1
    Registered User
    Join Date
    Dec 2007
    Posts
    2

    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 wrongness Salem's Avatar
    Join Date
    Aug 2001
    Location
    The edge of the known universe
    Posts
    32,417
    Use a cross-platform IDE like http://www.codeblocks.org/

    Use a cross-platform GUI toolkit like http://www.wxwidgets.org/

    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.
    I support http://www.ukip.org/ as the first necessary step to a free Europe.

  3. #3
    Registered User
    Join Date
    Oct 2006
    Posts
    250
    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, 09:43 AM
  4. Question..
    By pode in forum Windows Programming
    Replies: 12
    Last Post: 12-19-2004, 06:05 PM
  5. cross platform game programming
    By xddxogm3 in forum Game Programming
    Replies: 13
    Last Post: 08-22-2004, 09:40 AM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21