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

hensonzyw

macrumors newbie
Original poster
May 26, 2010
4
0
wuhan,Hubei,China
HELP! I'm a new Mac user, and I have to study C/C++. I have installed xcode in my mac, but after I researched in google, they told me I don't necessarily have to use the xcode that high-level software, the GCC is quite suitable for me. But I don't even know how to start the gcc program... Don't laugh at me, I'm really eager to study...Thank you :apple:
 
Also, once you open the terminal, you can treat it like pretty much any generic unix box from the command line. Except for installing programs, you'll probably want to go the OSX way, but any documentation on programming APIs, including low level things like read/write, are the same (pretty much) for all unix. So linux and bsd and just general C programming docs are useful too.
 
HELP! I'm a new Mac user, and I have to study C/C++. I have installed xcode in my mac, but after I researched in google, they told me I don't necessarily have to use the xcode that high-level software, the GCC is quite suitable for me. But I don't even know how to start the gcc program... Don't laugh at me, I'm really eager to study...Thank you :apple:

1. Make sure you have the latest XCode version. Look for it at developer.apple.com . Helps when everyone is talking about the same thing.

2. Start XCode and create a new project with type Application / Command Line Tool / C Command Line Tool. Build and compile it and run it and check on the console what the output is. Hint: If you don't know how to do any of these things in XCode, look through the menus.
 
that's the problem. I can't find the gcc installer in my developer tools file....
using the spotlight I can search out many files named gcc, but I can't find any applications....

Install Xcode.

Open Terminal.

Type "gcc". If it comes up with something like this:

Code:
i686-apple-darwin10-gcc-4.2.1: no input files

you're good to go.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.