Welcome to the MacNN Forums.

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

You are here: MacNN Forums > Software - Troubleshooting and Discussion > Developer Center > C++ Programming in OS X

C++ Programming in OS X
Thread Tools
Mac Enthusiast
Join Date: Dec 1999
Location: New York
Status: Offline
Reply With Quote
Apr 7, 2001, 08:43 PM
 
I am trying to learn C++, and I thought that OS X would be the perfect OS to use - Project Builder seems useful, and I have heard that you can compile from the command line. I have two questions:

How do you compile from the command line?

If I want to make a simple C++ program in ProjectBuilder, what kind of project do I make? I tried a Carbon Application, but it didn't work (wouldn't compile).

Any help would be greatly appreciated.
     
Forum Regular
Join Date: Dec 2000
Location: Rehoboth Beach,DE USA
Status: Offline
Reply With Quote
Apr 7, 2001, 08:58 PM
 
Ditch C++ and learn Objective C instead,it's a much better language.Project Builder doesn't have very good C++ support at this tme and its doubtful that it will,there's no reason to,as I said before Objective C is the superior language,and native to Project Builder and Interface Builder.
     
Moderator
Join Date: Sep 2000
Location: Irvine, CA
Status: Offline
Reply With Quote
Apr 7, 2001, 10:43 PM
 
g++ finename.cpp //from the terminal

./a.out // to run
{{{ mindwaves }}}
     
Addicted to MacNN
Join Date: Mar 2000
Location: London, UK
Status: Offline
Reply With Quote
Apr 8, 2001, 05:46 PM
 
The command on a plain vanilla OS X installation is actually c++

you can also specify the output filename by the following syntax:
c++ -o myprog myprog.c
     
   
Thread Tools
Forum Links
Forum Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Top
Privacy Policy
All times are GMT -5. The time now is 02:59 PM.
All contents of these forums © 1995-2011 MacNN. All rights reserved.
Branding + Design: www.gesamtbild.com
vBulletin v.3.8.7 © 2000-2011, Jelsoft Enterprises Ltd., Content Relevant URLs by vBSEO 3.3.2