Zdraveite ! V4era re6ih da so kompiliram edin prost cpp file s gcc. Zna4i source e :
Примерен код |
#include <iostream.h> int main(){ cout<<"Alabala"<<"\n"; return 0; }
|
Kogato go kompiliram s gcc ( gcc -o test test.cpp) mi izvejda slednite gre6ki:
gcc -o test test.cpp
In file included from /usr/include/c++/3.2.3/backward/iostream.h:31,
from test.cpp:1:
/usr/include/c++/3.2.3/backward/backward_warning.h:32:2: warning: #warning This file includes at least one deprecated or antiquated header. Please consider using one of the 32 headers found in section 17.4.1.2 of the C++ standard. Examples include substituting the <X> header for the <X.h> header for C++ includes, or <sstream> instead of the deprecated header <strstream.h>. To disable this warning use -Wno-deprecated.
/tmp/ccoxnuw2.o(.text+0x21): In function `main':
: undefined reference to `std::cout'
/tmp/ccoxnuw2.o(.text+0x26): In function `main':
: 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/ccoxnuw2.o(.text+0x2f): In function `main':
: 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/ccoxnuw2.o(.text+0x5c): In function `tcf_0':
: undefined reference to `std::ios_base::Init::~Init [in-charge]()'
/tmp/ccoxnuw2.o(.eh_frame+0x11): undefined reference to `__gxx_personality_v0'
collect2: ld returned 1 exit status
Kak da se spravq s problema ?