
26.06.2009, 12:44
|
|
Познавший АНТИЧАТ
Регистрация: 16.04.2006
Сообщений: 1,488
С нами:
10562786
Репутация:
537
|
|
gcc и g++
поставил в дебиан 4 gcc и g++
написал простой код:
PHP код:
#include <iostream>
using namespace std;
int main()
{
cout << "test";
return 1;
}
не компилируется:
Код:
deex@debian:~$ gcc -o ./file ./new.cpp
/tmp/cc6PLgCa.o: In function `__static_initialization_and_destruction_0(int, int)':
new.cpp:(.text+0x23): undefined reference to `std::ios_base::Init::Init()'
/tmp/cc6PLgCa.o: In function `__tcf_0':
new.cpp:(.text+0x6c): undefined reference to `std::ios_base::Init::~Init()'
/tmp/cc6PLgCa.o: In function `main':
new.cpp:(.text+0x8e): undefined reference to `std::cout'
new.cpp:(.text+0x93): 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/cc6PLgCa.o:(.eh_frame+0x11): undefined reference to `__gxx_personality_v0'
collect2: ld returned 1 exit status
почему? 
Последний раз редактировалось Дикс; 26.06.2009 в 12:51..
|
|
|