brad_umbaugh
Registered
Hi everyone,
I just installed the Apple Developer Tools and the update to it, and I'm trying to compile a simple Hello World type program in OS X from the command line. Unfortunately, I'm being stopped dead in my tracks...
Here's the program:
#include <iostream.h>
void main()
{
cout << "Hello World" << endl;
}
And here's the outpout:
[localhost:~/Dev/test] umbaugh% cc -o brad brad.cc
/usr/bin/ld: Undefined symbols:
ostream:: operator<<(char const *)
ostream:: operator<<(ostream &(*)(ostream &))
_cout
endl(ostream &)
Note that this program works just fine when I'm using project builder, just not from the terminal command line! I'm confused what could be going on here... it looks like it's saying that the operator isn't defined, but I looked at the iostream.h file and the is definitely defined. I'm wondering if it's finding an invalid iostream.h file or something? What folder is iostream.h supposed to be in?
Does anybody have any ideas why this won't work? I don't think it bodes well for my overall programming prowess if i can't get a cout statement to work!
Thanks much,
Brad
I just installed the Apple Developer Tools and the update to it, and I'm trying to compile a simple Hello World type program in OS X from the command line. Unfortunately, I'm being stopped dead in my tracks...
Here's the program:
#include <iostream.h>
void main()
{
cout << "Hello World" << endl;
}
And here's the outpout:
[localhost:~/Dev/test] umbaugh% cc -o brad brad.cc
/usr/bin/ld: Undefined symbols:
ostream:: operator<<(char const *)
ostream:: operator<<(ostream &(*)(ostream &))
_cout
endl(ostream &)
Note that this program works just fine when I'm using project builder, just not from the terminal command line! I'm confused what could be going on here... it looks like it's saying that the operator isn't defined, but I looked at the iostream.h file and the is definitely defined. I'm wondering if it's finding an invalid iostream.h file or something? What folder is iostream.h supposed to be in?
Does anybody have any ideas why this won't work? I don't think it bodes well for my overall programming prowess if i can't get a cout statement to work!
Thanks much,
Brad