1. Welcome to the new MacRumors forums. See our announcement and read our FAQ

G ++

Discussion in 'Mac Programming' started by SnowTronic, Apr 2, 2012.

  1. macrumors member

    Wirelessly posted

    Just starting out in programming, I've learned the basics of programming in c++ in windows I want to use Xcode on Mac but the problem is Xcode won't run c++ code because it's g++ complier the only thing is people on the web say a g++ compiler will run c++ code but I can't seem to figure out how to do this....so how do you do this? Any help is greatly app.
  2. macrumors G5


    You seem to be very confused. XCode comes not with one, but with two C++ compilers: The gcc compiler version 4.2, and the latest LLVM compiler.

    Start XCode, choose "New Project", and then have a good look at all the options that are there.
  3. macrumors 68030

    g++ is a C++ compiler. The compiler is not the problem here.

    Xcode takes some learning, in particular to understand how to set up projects and include code that was written elsewhere. I suggest that you start a new "Command Line Tool" project and try to get a simple "Hello World!" program to run.

    Finally, if you are using Windows specific libraries in your old code, it won't compile on the Mac.

    Let us know if you have further questions.

Share This Page