gcc_error?

Fórumok

hali, meg tudna valaki mondani mit is akar ezzel a gcc mondani?

~/work/c$ gcc alma.cpp
/tmp/ccKSCGRZ.o: In function `main':alma.cpp:(.text+0xa): undefined reference to `std::cout'
:alma.cpp:(.text+0xf): undefined reference to `std::basic_ostream >& std::operator<< >(std::basic_ostream >&, char const*)'
/tmp/ccKSCGRZ.o: In function `__tcf_0':alma.cpp:(.text+0x2c): undefined reference to `std::ios_base::Init::~Init()'
/tmp/ccKSCGRZ.o: In function `__static_initialization_and_destruction_0(int, int)':alma.cpp:(.text+0x55): undefined reference to `std::ios_base::Init::Init()'
/tmp/ccKSCGRZ.o:(.eh_frame+0x11): undefined reference to `__gxx_personality_v0'
collect2: ld returned 1 exit status

amire ezt irja az ez a kod:

#include

int main() {
std::cout << "hello world\n";
return 0;
}

ha teszek oda "#include " -et akkor :
alma.cpp:2:18: error: stdlib: No such file or directory

pedig stdlib.h van fenn

koszi

Hozzászólások

[FIXME]
g++ kell oda, a gcc csak ANSI C-t eszik(rossz libbel probal forgatni).