C++ Editing in Project Builder?

tmorrell

Registered
I am having trouble building basic programs with C++ in Project Builder 2.0. Am I using the wrong application? I mean am I supposed to already have the code done when using project builder? All that I want to do is code basis c++ programs and run them in project builder, then I will explore other options....


THanks,

Tony
 
have you done C++ programming on other platforms?

(like *nix?, VC++?,...etc)

I have done basic C++ programming on both VC++ and on Darwin. I mainly use the project builder to type out the code and use the gcc compiler to compile and make an executable file. I must say there are some syntax differences between the two platforms

I start learning classes soon....oh joy!(sarcastic remark)
 
I forgot to mention that I invoke the 'c++' compiler in terminal

for example, I would type this in a source file in PB:

#include <iostream.h>
#include <stdlib.h>
int main (int argc, const char * argv[])
{
// insert code here...
system("clear");
cout << "Hello, World!\n";
return 0;
}

then type this in terminal(without quotations)

"c++ -g -o hello hello.cpp"

it should work I hope.......
 
this is probably just the message board, but your include iostream and....(stdio?) isnt showing. gcc is used to compile C files, not C++. Try and grab a copy of codewarrior lite if you can, lots of old unused books come with copies of them. Pbuilder is a pain, i know. It has slowed my C++ learning to a crawl over the summer.
 
You can do c++ programming in ProjectBuilder. I used it all of last year for my C++ programming class. Make sure you select C++ tool from the menu when you create a new project.

-JARinteractive
 
Program away no problem. Project Builder is just an IDE - a pretty front end to all the unix tools - so you can do the same thing either way.

I would suggest Emacs ;-)

If you are a beginner either follow some cookbook examples or use a PB example as a basis to work from. There are some differences between how dynamic library code is handled on Darwin vs. different Unicies so be aware of things related to frameworks if you are going the command line route.

-Eric
 
Back
Top