very basic gcc question
- From: "Brian J. Rohan" <bjrohan home com>
- To: gtk-list gnome org
- Subject: very basic gcc question
- Date: Tue, 07 Nov 2000 20:49:39 -0800
I am new to C++, and realize this may not be the best group to post
C++ questions in (what group would be best?). I have tried to compile a
very basic C++ program as follows:
#include <iostream.h>
int main()
{
cout <<"Hello World!\n";
return 0;
}
I then go to the directory contaiing the .cc file above, and type gcc
ch1proj1.cc (the name of the file)
I then get the following error messages:
/tmp/cc2y1g3w.o: IN function `main':
/tmp/cc2y1g3w.o(.text+0xf): undefined reference to `cout'
/tmp/cc2y1g3w.0(.text+0xf): undefined reference to
`ostream::operator<<(char const *)'
collect2: ld returned 1 exit status
What is wrong?? i am using RedHat7.0, I recently upgraded form 6.2
Thank you very much
Brian
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]