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

Fender2112

macrumors 65816
Original poster
Aug 11, 2002
1,135
386
Charlotte, NC
I'm trying to use Xcode to creat simple c++ source files for a class I'm taking. I've been using Code Warrior which allows me to set up a standard c++ console template. How do I do this with Xcode? A standard c++ console does not seem to a a standard template option for Xcode.

Someone mentioned in another thread that they use gcc as their compiler. Is gcc "built" into Xcode or is a stand alone IDE , like Code Warrior?

Keep in mind that I'm an extreme novice in programming. I use Code Warrior at home on my Mac and Visual Studio on a PC in class. Any references or suggestions the "Console" are a bit beyound my understanding.

A litte help or nudge in the right direction would be much appreciated.

Thanks
 

bousozoku

Moderator emeritus
Jun 25, 2002
15,718
1,891
Lard
Xcode and CodeWarrior are both IDEs. Integrated Development Environments allow a (more-or-less) cohesive melding of programming tools, including editors, compilers, and linkers.

Xcode invokes gcc to compile code, CodeWarrior invokes mwcc to do the same. You can call them manually at any shell prompt or let the IDE do it for you.
 

Fender2112

macrumors 65816
Original poster
Aug 11, 2002
1,135
386
Charlotte, NC
Originally posted by bousozoku
Xcode and CodeWarrior are both IDEs. Integrated Development Environments allow a (more-or-less) cohesive melding of programming tools, including editors, compilers, and linkers.

Xcode invokes gcc to compile code, CodeWarrior invokes mwcc to do the same. You can call them manually at any shell prompt or let the IDE do it for you.

That's what I thought.

As for my other question. With Code Warrior, I can open a new project and set the target as a "std c++ console". With Xcode, I seem to have every option except this.

I could start from scratch with an empty project. But that is a bit beyond my skills. I may create a blank project with Code Warrior. Then import it to Xcode and use it as a template. Does this sound practical?
 

ksz

macrumors 68000
Oct 28, 2003
1,677
111
USA
Originally posted by Fender2112
As for my other question. With Code Warrior, I can open a new project and set the target as a "std c++ console". With Xcode, I seem to have every option except this.
XCode does have an option to create a C++ console application. Look further down in the new project dialog box under the "Tools" category. You'll find a console project type listed there.
 

ksz

macrumors 68000
Oct 28, 2003
1,677
111
USA
Originally posted by ksz
XCode does have an option to create a C++ console application. Look further down in the new project dialog box under the "Tools" category. You'll find a console project type listed there.
Correction: Choose "C++ Tool" which builds a console app.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.