Recently i change my c++ programming environment from Windows to openSuSe 11.0, and i met lot of problem when i compile the source code.I had install everything of the add-on in Yast->software management->c/c++.
I start with the simplest program “hello world”,which only cout the world “hello world”.Here is the problem:
ass.cpp:(.text+0xa): undefined reference to std::cout' ass.cpp:(.text+0xf): undefined reference to
std::basic_ostream<char, std::har_traits<char> >& std::operator<< <std::char_traits<char> >(std::basic_osream<char, std::char_traits<char> >&, char const*)’
ass.cpp:(.text+0x17): undefined reference to std::basic_ostream<char, std:char_traits<char> >& std::endl<char, std::char_traits<char> >(std::basic_osream<char, std::char_traits<char> >&)' ass.cpp:(.text+0x1c): undefined reference to
std::basic_ostream<char, std:char_traits<char> >::operator<<(std::basic_ostream<char, std::char_traits<car> >& (*)(std::basic_ostream<char, std::char_traits<char> >&))’
/tmp/ccOgf11w.o: In function __static_initialization_and_destruction_0(int int)': ass.cpp:(.text+0x4a): undefined reference to
std::ios_base::Init::Init()’
ass.cpp:(.text+0x4f): undefined reference to std::ios_base::Init::~Init()' /tmp/ccOgf11w.o:(.eh_frame+0x12): undefined reference to
__gxx_personalityv0’
collect2: ld returned 1 exit status
what does it mean?
it seems like the compiler does not recognize the <iostream> header.Is there any big difference between gcc compiler and Windows(i use Bloodshed Dev c++).
I need help because i want to change from Windows to Linux.Perhaps i can get some link for more information about gcc compiler.thanks…