Forums | MacLife
You are not logged in.
#1 2003-08-20 5:26 pm
- damenace
- Member
- Registered: 2003-08-20
- Posts: 16
Is there C for MAc or VPC & C++......my best solution/?
I have a tibook 1Ghz with 1 Gig ram. Running VPC6.
Im taking a C/C++ EE class and I need to program. Are there C programs for macs that are identical to their PC counterparts?. I currrently have installed VPC 6.0 w/ Win 2000 and visualnet (C/C++) all of this of course is on top of 10.2.6
Will this work????????
Is this the best operating system I could use?
oh yes......any way i can detect a fat32 firewire hd through vpc?? I have a firewire driver error for some reason
Offline
#2 2003-08-20 7:53 pm
Re: Is there C for MAc or VPC & C++......my best solution/?
Have you tried installing the developer's tools? The Dev tools comes with an IDE that you can use to target a number of different languages (Applescript, Java, C, etc).
To get the tools, sign up for a free ADC account at http://connect.apple.com/. Once you sign up and login, you can download and install the dev tools.
Offline
#3 2003-08-20 9:24 pm
- assassin_bill
- International Bitch Maker

- From: (__
- Registered: 2003-08-06
- Posts: 1293
- Website
Re: Is there C for MAc or VPC & C++......my best solution/?
Project Builder, an apple dev tool, is what you're looking for. When you create a project (in the file menu) you'll want to select the C++ Tool project at the bottom as you're starting point. From here, you'll want to make your new source files which will apear in the right hand column. Make sure when you compile your source file that only that source file is in the target (there will be a bullet beside it which you can click to make it in or out of the target). Good Luck.
P.S. Never let any of those |_337ist windows people tell you their os is a better development platform because they are just plain wrong (you'll see when you get up there)! Also, there are some discrepencies in the stdlib's of MS and the GNU compiler so beware...
P.S.2. You'll want to use Project Builder, or another mac native dev tool because Virtual PC would be a bitch when you have a long compile.
Innovation will not be included in the intel switch
Offline
#4 2003-08-20 10:21 pm
- Gary Patterson
- Registered: 2000-09-19
- Posts: 4732
Re: Is there C for MAc or VPC & C++......my best solution/?
The compiler's environment will not be identical, but then part of learning C and C++ is learning how to use makefiles, different IDEs, etc. Variety can only improve your knowledge.
Having said that... I can vouch for one compiler that has an identical IDE - CodeWarrior, from Metrowerks. It's about as good as development gets, but it costs a good chunk'o'cash to buy (you may get a student discount though).
If you don't want to pay a cent, use Apple's developer tools. The ProjectBuilder app is an excellent compiler, but is slower than CodeWarrior and generates slower code. You shouldn't have to worry about that though, unless you're going to write high-performance code. All the student courses I know of focus on getting the code correct first, so you'll be fine.
And resist anyone who says that Visual-C++ is somehow a standard! It's popular, but things change, and the people who know how to use many compilers in many different IDEs will be the ones who will cope best with changes.
Offline
#6 2003-08-21 9:23 pm
- damenace
- Member
- Registered: 2003-08-20
- Posts: 16
Re: Is there C for MAc or VPC & C++......my best solution/?
thanks for the reply. I'm just hesisitant to use anything besides what is reccomended for the class. This is one of the toughest low level weedout classes and I just don't want to feel slightly disadvantaged since I won't be using the same exact software as everyone else. I know the code or syntax of C should be same in whatever program you write it in but will doing it on a mac be THAT much differnet? and what is IDE
Offline
#7 2003-08-21 10:51 pm
Re: Is there C for MAc or VPC & C++......my best solution/?
Doing basic C on a Mac isn't any different to doing it on a PC.
An IDE is an Integrated Development Environment - fire up Project Builder for an example.
Offline
#8 2003-08-22 12:26 am
- Ellipsoid
- Member
- From: Lake Forest, IL, U.S.A.
- Registered: 2000-12-22
- Posts: 798
Re: Is there C for MAc or VPC & C++......my best solution/?
There is one C programming language, that will never change. You'll not see a single disadvantage here.
Only trouble you should hit is if you start doing GUI work, 'cause the window calls are different between systems.
"What is a friend? A soul dwelling in two bodies." - Aristotle
Offline
#9 2003-08-25 2:44 pm
- damenace
- Member
- Registered: 2003-08-20
- Posts: 16
Re: Is there C for MAc or VPC & C++......my best solution/?
whats carbon/carbon.h? why is this automaticly included when i open a new C file.......
Ps. Thnx for the help everyone. Ill doing mostly C and spending a few lectures on C++/Fortran later and i think the development tools is going to be very usefull. Thank god i don't have to use VPC & studio.net
PS2. Wait is there fortran in this thing?
Offline
#10 2003-08-25 8:05 pm
Re: Is there C for MAc or VPC & C++......my best solution/?
No, not within project builder.
If you're doing Fortran 77 then there's a free command line compiler that you can download, but if you're doing Fortran 90 then you're outta luck, I'm afraid.
Offline
#11 2003-08-25 8:29 pm
Re: Is there C for MAc or VPC & C++......my best solution/?
I have a tibook 1Ghz with 1 Gig ram. Running VPC6.
Im taking a C/C++ EE class and I need to program. Are there C programs for macs that are identical to their PC counterparts?
A word of warning. Output is buffered on the Mac so call fflush(stdout) after printf and before scanf.
http://developer.apple.com/tools/xcode/faq.html
Offline
#12 2003-08-25 8:46 pm
- damenace
- Member
- Registered: 2003-08-20
- Posts: 16
Re: Is there C for MAc or VPC & C++......my best solution/?
It's fortran 77......any advice on what i could use?
carbon.h??
Offline
#13 2003-08-26 2:05 am
Re: Is there C for MAc or VPC & C++......my best solution/?
There's the GNU Fortran 77 compiler called g77.
http://gravity.psu.edu/~khanna/hpc.html
Offline
#14 2003-08-27 3:26 pm
- damenace
- Member
- Registered: 2003-08-20
- Posts: 16
Re: Is there C for MAc or VPC & C++......my best solution/?
A word of warning. Output is buffered on the Mac so call fflush(stdout) after printf and before scanf.
http://developer.apple.com/tools/xcode/faq.html
Wait so what do I have to do??
Everytime I use scanf/printf.....i use fflush(stdout)??
Offline
#15 2003-08-28 5:25 am
- Gary Patterson
- Registered: 2000-09-19
- Posts: 4732
Re: Is there C for MAc or VPC & C++......my best solution/?
I used to use SIOUX in CodeWarrior for those simple in/out text things. Never had to worry about fflush though... it was some time ago...
Offline
#16 2003-08-28 9:24 pm
Re: Is there C for MAc or VPC & C++......my best solution/?
BTW, we've now got a much better free FORTRAN compiler than g77 - IBM has released a version of XL FORTRAN for Mac OS X.
They also released their C/C++/Objective-C compiler. 
Offline
#17 2003-08-29 9:15 pm
- agt007
- Member
- From: Canada
- Registered: 2000-10-11
- Posts: 953
Re: Is there C for MAc or VPC & C++......my best solution/?
After you install the developer tools, you can use the UNIX commands for compiling C, or C++ programs.
to compile:
g++ -Wall -Werror -pedantic -ansi myProgram.cpp
this will generate a 'a.out' file. To execute it, type:
./a.out
Bond, James Bond
Offline
#18 2003-08-30 7:53 am
Re: Is there C for MAc or VPC & C++......my best solution/?
BTW, we've now got a much better free FORTRAN compiler than g77 - IBM has released a version of XL FORTRAN for Mac OS X.
They also released their C/C++/Objective-C compiler.IBM's stuff doesn't do Objective-C, does it?
It doesn't, I was sadly mistaken.
Offline
#19 2003-09-01 9:14 pm
- damenace
- Member
- Registered: 2003-08-20
- Posts: 16
Re: Is there C for MAc or VPC & C++......my best solution/?
ok im testing this thing out.....but how do i test the program and debug it?
Offline
#20 2003-09-01 9:32 pm
- damenace
- Member
- Registered: 2003-08-20
- Posts: 16
Re: Is there C for MAc or VPC & C++......my best solution/?
ok i htink im getting the hang of this. My problem was that I created a file instead of a project....im playing around with this program so hopefully i get the hang of this IDE
Offline



