I write a simple problem ,as:
*************** ***************
//temp.cpp
#include<iostre am.h>
int main(void){
cout<<"12313123 1";
return 0;
}
*************** **************
and when I type "gcc -o temp temp.cpp", it shows:
*************** *************** *
In file included from /usr/include/c++/4.0.2/backward/iostream.h:31,
from temp.cpp:1:
/usr/include/c++/4.0.2/backward/backward_warnin g.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 <iostream> instead of
the deprecated header <iostream.h>. To disable this warning use
-Wno-deprecated.
/tmp/cc2wKN3t.o: In function `main':
temp.cpp:(.text +0x25): undefined reference to `std::cout'
temp.cpp:(.text +0x2a): undefined reference to `std::basic_ost ream<char,
std::char_trait s<char> >& std::operator<< <std::char_trai ts<char>[color=blue]
>(std::basic_os tream<char, std::char_trait s<char> >&, char const*)'[/color]
/tmp/cc2wKN3t.o: In function `__tcf_0':
temp.cpp:(.text +0x47): undefined reference to
`std::ios_base: :Init::~Init()'
/tmp/cc2wKN3t.o: In function
`__static_initi alization_and_d estruction_0(in t, int)':
temp.cpp:(.text +0x74): undefined reference to
`std::ios_base: :Init::Init()'
/tmp/cc2wKN3t.o:(.eh _frame+0x11): undefined reference to
`__gxx_personal ity_v0'
collect2: ld returned 1 exit status
*************** *************** *
Could anyone tell me what teh problem is?
*************** ***************
//temp.cpp
#include<iostre am.h>
int main(void){
cout<<"12313123 1";
return 0;
}
*************** **************
and when I type "gcc -o temp temp.cpp", it shows:
*************** *************** *
In file included from /usr/include/c++/4.0.2/backward/iostream.h:31,
from temp.cpp:1:
/usr/include/c++/4.0.2/backward/backward_warnin g.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 <iostream> instead of
the deprecated header <iostream.h>. To disable this warning use
-Wno-deprecated.
/tmp/cc2wKN3t.o: In function `main':
temp.cpp:(.text +0x25): undefined reference to `std::cout'
temp.cpp:(.text +0x2a): undefined reference to `std::basic_ost ream<char,
std::char_trait s<char> >& std::operator<< <std::char_trai ts<char>[color=blue]
>(std::basic_os tream<char, std::char_trait s<char> >&, char const*)'[/color]
/tmp/cc2wKN3t.o: In function `__tcf_0':
temp.cpp:(.text +0x47): undefined reference to
`std::ios_base: :Init::~Init()'
/tmp/cc2wKN3t.o: In function
`__static_initi alization_and_d estruction_0(in t, int)':
temp.cpp:(.text +0x74): undefined reference to
`std::ios_base: :Init::Init()'
/tmp/cc2wKN3t.o:(.eh _frame+0x11): undefined reference to
`__gxx_personal ity_v0'
collect2: ld returned 1 exit status
*************** *************** *
Could anyone tell me what teh problem is?
Comment