V
vcgeek
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(.text+0x14): In function `main':
: undefined reference to `std::basic_ostream<char,
: undefined reference to `std::cout'
/tmp/ccIWkyfm.o(.text+0x26): In function `main':
: undefined reference to `std::basic_ostream<char,
: undefined reference to `std::basic_ostream<char,
std::char_traits<char> >:
perator<<(std::basic_ostream<char,
std::char_traits<char> >& (*)(std::basic_ostream<char,
std::char_traits<char> >&))'
/tmp/ccIWkyfm.o(.text+0x5c): In function
`__static_initialization_and_destruction_0(int, int)':
: undefined reference to `std::ios_base::Init::Init[in-charge]()'
/tmp/ccIWkyfm.o(.text+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_personality_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(.text+0x14): In function `main':
: undefined reference to `std::basic_ostream<char,
/tmp/ccIWkyfm.o(.text+0x21): In function `main':std::char_traits said:(std::basic_ostream<char, std::char_traits<char> >&)'
: undefined reference to `std::cout'
/tmp/ccIWkyfm.o(.text+0x26): In function `main':
: undefined reference to `std::basic_ostream<char,
/tmp/ccIWkyfm.o(.text+0x2f): In function `main':std::char_traits said:(std::basic_ostream<char, std::char_traits<char> >&, char const*)'
: undefined reference to `std::basic_ostream<char,
std::char_traits<char> >:
std::char_traits<char> >& (*)(std::basic_ostream<char,
std::char_traits<char> >&))'
/tmp/ccIWkyfm.o(.text+0x5c): In function
`__static_initialization_and_destruction_0(int, int)':
: undefined reference to `std::ios_base::Init::Init[in-charge]()'
/tmp/ccIWkyfm.o(.text+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_personality_v0'
collect2: ld returned 1 exit status
Didn't think I'd need help this early.
TIA
Gary