Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

letaalio

macrumors member
Original poster
Nov 15, 2006
48
0
Can someone tell me how can I use xCode for C++ development? In the preferences menu it only allows me to select AppleScript for the default languange and I can't save files in any other formats...

I wan't an editor + compilator (like xCode is..?) which works for C++. Where I could run the code, maybe? (Something like DevC++ in Windows)

I am coming from the Linux/Windows world and I know I can use g++ in the Terminal to compile files, but i don't think that is the most comfortable way.

First week of using a Mac :) and not a native english speaker so don't be too harsh on me.

*update: it's nothing professional, just some stuff for the university
 

Sayer

macrumors 6502a
Jan 4, 2002
981
0
Austin, TX
It is Xcode, not xCode (this is not X-windows land).

Xcode is meant for working on projects, C/C++/objC projects.

You want to create a new Project instead of File via the File menu. There you can pick what type of code you want to write.
 

bousozoku

Moderator emeritus
Jun 25, 2002
15,719
1,894
Lard
You'll want to select New... from the File menu and then, select a C++ tool project.

Remove the code you don't want and replace it with the code for your assigment. You can build and run and it should work fine.

You could also compile and run on the command line, but it's much easier to create a project and edit the files in Xcode.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.