|
|
Can I learn C++ on OSX??
|
|
|
|
Forum Regular
Join Date: Jul 2002
Location: Ireland
Status:
Offline
|
|
right I have a few questions about C++ on the Mac...
I start learning C++ in college soon but on PCs , is it possible to practise on my mac at home? I notice there is a C++ "tool" in project builder can this be used or would I have to use the terminal or what. Can I make stand-alone applications that I can double click on?
Also is it possible for C++ apps on OSX to have a GUI or just the console?
sorry for the silly questions but I want to know
thanks for your time.
|
|
|
|
|
|
|
|
|
Clinically Insane
Join Date: Oct 2001
Location: San Diego, CA, USA
Status:
Offline
|
|
Yes, you can compile C++ on the Mac. You can use the "C++ Tool" template in Project Builder if you'd like. This will create a program that you'll have to run either through Project Builder's console or the Terminal.
If you don't want to use Project Builder, you can just write your code in a normal text file and compile it in the Terminal with gcc.
You can make normal GUI applications in C++, but AFAIK you'd have to go through Carbon, and that is much more of a headache than a beginner would want to go through.
(
Last edited by Chuckit; Oct 8, 2002 at 04:38 PM.
)
|
Chuck
___
"Instead of either 'multi-talented' or 'multitalented' use 'bisexual'."
|
|
|
|
|
|
|
|
Mac Elite
Join Date: Sep 2000
Location: Tempe, AZ
Status:
Offline
|
|
You can edit & compile things in the terminal using, for example, 'vi main.cpp' and 'g++ main.cpp'
You can also use the C++ tool in Project Builder to create the same type of console program as you would from Terminal.
Or you can combine C++ code with calls to either/both the Carbon/Cocoa APIs to make GUI applications. It's very very easy to slap a rudimentary user interface onto a C++ program using Cocoa and Interface Builder - if you read through Apple's Currency Converter tutorial and you already know how to write C++, you're pretty much done.
|
Geekspiff - generating spiffdiddlee software since before you began paying attention.
|
|
|
|
|
|
|
|
Mac Elite
Join Date: May 2002
Status:
Offline
|
|
OS X is certainly a viable platform for learning C++, given that I'm doing just that at the moment.
|
[vash:~] banana% killall killall
Terminated
|
|
|
|
|
|
|
|
Professional Poster
Join Date: Apr 2001
Location: Asheville, NC
Status:
Offline
|
|
Also, it would be important to point out that C++ alone does NO GUI work at all. With C++, you can do command line programs. You would have to learn some separate API to do GUI programming. Thus, if you are learning C++ in a class, you will be just fine on OS X.
|
ACSA 10.4/10.3, ACTC 10.3, ACHDS 10.3
|
|
|
|
|
|
|
|
Junior Member
Join Date: Sep 2002
Location: New Jersey
Status:
Offline
|
|
Okay, I just bought my iBook this past weekend and when I try to compile something for C++ it says that "gcc: command not found". Do I need to install the GCC compiler? Can someone tell me where I should download or get the necessary packages. Thanks!
|
|
|
|
|
|
|
|
|
Forum Regular
Join Date: Jul 2002
Location: Ireland
Status:
Offline
|
|
cool thanks for the replies , you cleared up a lot of quiries.
|
|
|
|
|
|
|
|
|
hayesk
|
|
Originally posted by HoOn:
Okay, I just bought my iBook this past weekend and when I try to compile something for C++ it says that "gcc: command not found". Do I need to install the GCC compiler? Can someone tell me where I should download or get the necessary packages. Thanks!
You have to install the Developer tools. I believe they are on one of the install CDs, in a folder somewhere. If not, you can download them from Apple. Be sure to have a fast Internet connection if you go that route.
|
|
|
|
|
|
|
|
|
Professional Poster
Join Date: Apr 2001
Location: Asheville, NC
Status:
Offline
|
|
Originally posted by hayesk:
You have to install the Developer tools. I believe they are on one of the install CDs, in a folder somewhere. If not, you can download them from Apple. Be sure to have a fast Internet connection if you go that route.
I've heard that with new computers, the installer is in /Applications/Installers
|
ACSA 10.4/10.3, ACTC 10.3, ACHDS 10.3
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Forum Rules
|
|
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
|
HTML code is Off
|
|
|
|
|
|
|
|
|
|
|
|