Cross compiling for windows using Xcode

Discussion in 'Mac Programming' started by e-r-a-n, Nov 6, 2012.

  1. e-r-a-n macrumors member

    Jan 5, 2012
    continuing me previous post, where i asked about cgal library, i now managed to run on my mac c++ code with installed cgal libraries (using macports)
    now i have another issue, i wish to target it for windows.
    i read some breif explenation saying to change compiler to cygwin.
    im not sure how & even if its already installed,
    but another point to take into consideration, will it work with the installed cgal libraries? or will it ignore it for some reason?
  2. ghellquist macrumors regular

    Aug 21, 2011
    Stockholm Sweden

    Cross-compiling from one platform to another is sort of complicated. At least has every time I have worked on it. Not worth it if you ask me as there are always little nagging things creating problems. And you still need to test it on the actual target anyway.

    So, simple don´t. Get a windows partition and boot into that (or run it as a virtual machine) and compile and test on that platform. Saves lots and lots of trouble.

    Other ideas to take home. Always use a source code version control system, GIT is one example. Fetch the code from there into the different environments and check changes back in.

    // Gunnar
  3. e-r-a-n thread starter macrumors member

    Jan 5, 2012
    well, im getting the picture and it does seems complicated
    sadly, i need to work with cgal library, and its was too complicated to install on a windows machine
    the installation & setup on mac + xcode was very easy and its already working.
    so i just thought maybe to compile to windows from my mac, and get it done already..

    further testing is not an issue at all, i have windows7 with parallels anyway

    about git, i should use it but in this case its really a few lines
    but thanks for the advice
  4. Madd the Sane macrumors 6502a

    Madd the Sane

    Nov 8, 2010
    Theoretically, Xcode's architecture support can make targeting the Windows architecture fairly easy. However there are no projects that I know of that takes advantage of this.

Share This Page