Код: Выделить всё
#include <iostream>
using namespace std;
int main() {
cout << "Hello, World!!!\n";
return 0;
}Казалось бы.. все просто..
Пишет:
migaro@pepelatz:~/programing/cpp$ gcc prog.cpp
/tmp/ccONTruu.o: In function `main':
prog.cpp:(.text+0x1c): undefined reference to `std::cout'
prog.cpp:(.text+0x21): 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/ccONTruu.o: In function `__static_initialization_and_destruction_0(int, int)':
prog.cpp:(.text+0x50): undefined reference to `std::ios_base::Init::Init()'
prog.cpp:(.text+0x55): undefined reference to `std::ios_base::Init::~Init()'
/tmp/ccONTruu.o:(.eh_frame+0x11): undefined reference to `__gxx_personality_v0'
collect2: ld returned 1 exit status
Кто что скажет?..