I'm just beginning and I'm having trouble starting. Can't get this to
compile and could use some direction.
#include <iostream>
using namespace std;
int main () {
cout << "Hello World" << endl;
}
Here are the particulars:
uname -a
Linux tegary-lnx 2.4.20-8 #1 Thu Mar 13 17:54:28 EST 2003 i686 i686
i386 GNU/Linux
gcc --version
gcc (GCC) 3.2.2 20030222 (Red Hat Linux 3.2.2-5)
Copyright (C) 2002 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is
NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR
PURPOSE.
gcc hw.cc
/tmp/ccIWkyfm.o(.tex t+0x14): In function `main':
: undefined reference to `std::basic_ost ream<char,
std::char_trait s<char& std::endl<char, std::char_trait s<char>
/tmp/ccIWkyfm.o(.tex t+0x21): In function `main':
: undefined reference to `std::cout'
/tmp/ccIWkyfm.o(.tex t+0x26): In function `main':
: undefined reference to `std::basic_ost ream<char,
std::char_trait s<char& std::operator<< <std::char_trai ts<char>
/tmp/ccIWkyfm.o(.tex t+0x2f): In function `main':
: undefined reference to `std::basic_ost ream<char,
std::char_trait s<char::operato r<<(std::basic_ ostream<char,
std::char_trait s<char& (*)(std::basic_ ostream<char,
std::char_trait s<char&))'
/tmp/ccIWkyfm.o(.tex t+0x5c): In function
`__static_initi alization_and_d estruction_0(in t, int)':
: undefined reference to `std::ios_base: :Init::Init[in-charge]()'
/tmp/ccIWkyfm.o(.tex t+0x8b): In function `__tcf_0':
: undefined reference to `std::ios_base: :Init::~Init [in-charge]()'
/tmp/ccIWkyfm.o(.eh_ frame+0x11): undefined reference to
`__gxx_personal ity_v0'
collect2: ld returned 1 exit status
Didn't think I'd need help this early.
TIA
Gary
compile and could use some direction.
#include <iostream>
using namespace std;
int main () {
cout << "Hello World" << endl;
}
Here are the particulars:
uname -a
Linux tegary-lnx 2.4.20-8 #1 Thu Mar 13 17:54:28 EST 2003 i686 i686
i386 GNU/Linux
gcc --version
gcc (GCC) 3.2.2 20030222 (Red Hat Linux 3.2.2-5)
Copyright (C) 2002 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is
NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR
PURPOSE.
gcc hw.cc
/tmp/ccIWkyfm.o(.tex t+0x14): In function `main':
: undefined reference to `std::basic_ost ream<char,
std::char_trait s<char& std::endl<char, std::char_trait s<char>
>(std::basic_os tream<char, std::char_trait s<char&)'
: undefined reference to `std::cout'
/tmp/ccIWkyfm.o(.tex t+0x26): In function `main':
: undefined reference to `std::basic_ost ream<char,
std::char_trait s<char& std::operator<< <std::char_trai ts<char>
>(std::basic_os tream<char, std::char_trait s<char&, char const*)'
: undefined reference to `std::basic_ost ream<char,
std::char_trait s<char::operato r<<(std::basic_ ostream<char,
std::char_trait s<char& (*)(std::basic_ ostream<char,
std::char_trait s<char&))'
/tmp/ccIWkyfm.o(.tex t+0x5c): In function
`__static_initi alization_and_d estruction_0(in t, int)':
: undefined reference to `std::ios_base: :Init::Init[in-charge]()'
/tmp/ccIWkyfm.o(.tex t+0x8b): In function `__tcf_0':
: undefined reference to `std::ios_base: :Init::~Init [in-charge]()'
/tmp/ccIWkyfm.o(.eh_ frame+0x11): undefined reference to
`__gxx_personal ity_v0'
collect2: ld returned 1 exit status
Didn't think I'd need help this early.
TIA
Gary
Comment