PDA

View Full Version : Free C++ compiler for mac?????????


AnimaVanquisher
03-25-2005, 05:14 AM
I can't find any free c++ compilers for the Macintosh.

LetterRip
03-25-2005, 05:36 AM
Macintosh OS X or classic?

OS X you have the XCode with their custom compile of gcc (came on a cd with your computer), for classic you can use apples free development environment for classic (either with their compiler or with gcc) don't recall its name.

LetterRip

mummey
03-25-2005, 07:08 AM
I can't find any free c++ compilers for the Macintosh.

Mac has Project Builder, xcode, and gcc. None of these work?

AnimaVanquisher
03-25-2005, 07:26 AM
Mac has Project Builder, xcode, and gcc. None of these work?
I just recently found those but I went to a c++ tutorial and typed in what it said and this dumb error keeps poppin up in xcode.Here is what the tutorial said to type(look in the grey box at the site)

tutor site (http://cplus.about.com/od/beginnerctutorial/l/aa020502a.htm)

the error in xcode said somethin about cannot place after some symbol.(it really said "some symbol") it also said "(-2740)"

stew
03-29-2005, 09:52 AM
You didn't copy and paste the source code from the web site, did you? Most of the time that will give you all kinds of weird invisible characters in your source file that the compiler chokes on.

AnimaVanquisher
04-02-2005, 11:42 PM
No. I typed it in myself.

LetterRip
04-03-2005, 12:17 AM
Another possibility is that it was typed in a rich text format text editor instead of plain text.

Did you open xcode, create a new project and then type the code in a text window of xcode? Or did you type the code in apples text editor (which has a default format of RTF).

LetterRip

blueagave
04-03-2005, 06:54 AM
In Xcode, select File->New Project

Then choose C++ Tool under Command Line Utility (you are doing plain C++, no GUI)

Then pick a name and choose a directory - for example, I chose a name of blah and
a directory of ~/src/blah (~ is your home directory, and src is the traditional Unix
directory for source code)

Click finish

You'll get the main Xcode project window.

Expand the Source group (on the left), and click on main.cpp. You'll see the default
code which happens to be very similar to the example you linked to. You can either
delete the provided code and type in your example (Cut 'n Paste won't work from
that About web site), or just go with the autogenerated code.

Under Build and Go, select Build and Run. Depending on whether you typed in the code
from About.com, or went with the autogenerated code you will either see:
"Hello World From About" or "Hello, World" respectively.

Hope that helps.

blueagave
04-03-2005, 07:20 AM
(Oops, too many clicks on the submit button)

CGTalk Moderation
04-03-2005, 07:20 AM
This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.