T
Tim Judd
I must not be grasping anything here.
Just a simple application, as follows (as any first-program is...)
----
#include <iostream.h>
int main() {
cout <<"hello world";
return 0;
}
----
never compiles! Tried it on FreeBSD, OpenBSD, Windows (under Visual C++ for
Console App), OS X developer tools. THEY ALL complain!
pretty much the same reason too!
/tmp/ccJ31810.o: In function `main':
/tmp/ccJ31810.o(.text+0xf): undefined reference to `cout'
/tmp/ccJ31810.o(.text+0x14): undefined reference to
`ostream:perator<<(char const *)'
collect2: ld returned 1 exit status
But... I thought the #include was supposed to bring in the definitions from
that file before checking the code for execution problems.
I don't understand why it won't work, no matter the tutorials I see, books I
read, articles I read! Can someone point me in the right direction, a
utterly clueless newbie! (yes, I called myself that, so you can call me
that ONCE, too!)
Appreciate it in advance, email is spam-blocked, remove the single period
PRIOR to the @ sign to reply by mail.
--Tim
Just a simple application, as follows (as any first-program is...)
----
#include <iostream.h>
int main() {
cout <<"hello world";
return 0;
}
----
never compiles! Tried it on FreeBSD, OpenBSD, Windows (under Visual C++ for
Console App), OS X developer tools. THEY ALL complain!
pretty much the same reason too!
/tmp/ccJ31810.o: In function `main':
/tmp/ccJ31810.o(.text+0xf): undefined reference to `cout'
/tmp/ccJ31810.o(.text+0x14): undefined reference to
`ostream:perator<<(char const *)'
collect2: ld returned 1 exit status
But... I thought the #include was supposed to bring in the definitions from
that file before checking the code for execution problems.
I don't understand why it won't work, no matter the tutorials I see, books I
read, articles I read! Can someone point me in the right direction, a
utterly clueless newbie! (yes, I called myself that, so you can call me
that ONCE, too!)
Appreciate it in advance, email is spam-blocked, remove the single period
PRIOR to the @ sign to reply by mail.
--Tim