В чем ошибка ?
#include <iostream>
using namespace std;
int main()
{
cout <<"OK";
return 0;
}
namolem@localhost:~$ gcc ./test.cpp
/tmp/cc4kcbA6.o: In function `main':
test.cpp:(.text+0xa): undefined reference to `std::cout'
test.cpp:(.text+0xf): undefined reference to `std::basic_ostream<char, std::char_traits<char> >& std::operator<< <std::char_traits<char> >(std::basic_ostream<char, std::char_traits<char> >&, char const*)'
/tmp/cc4kcbA6.o: In function `__static_initialization_and_destruction_0(int, int)':
test.cpp:(.text+0x3d): undefined reference to `std::ios_base::Init::Init()'
test.cpp:(.text+0x42): undefined reference to `std::ios_base::Init::~Init()'
/tmp/cc4kcbA6.o:(.eh_frame+0x12): undefined reference to `__gxx_personality_v0'
collect2: выполнение ld завершилось с кодом возврата 1