PDA

View Full Version : G ++




SnowTronic
Apr 2, 2012, 08:35 AM
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.



gnasher729
Apr 2, 2012, 08:49 AM
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.

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.

thundersteele
Apr 2, 2012, 12:32 PM
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.