H_D_R
Full Member level 6
Hello all,
i am learning C++ on linux.
i have tried to compile very simple code "Fiert.cc"
when i compiled this code i am getting such warning msg.
can any one please help me to solve this problem..??
i am learning C++ on linux.
i have tried to compile very simple code "Fiert.cc"
Code:
1: #include <iostream.h>
2:
3: main()
4: {
5: float pi = 3.14;
6: cout << "The value of pi is " << pi << "\n";
7: return 0;
8: }
In file included from /usr/lib/gcc/i386-redhat-linux/4.1.2/../../../../include/c++/4.1.2/backward/iostream.h:31,
from 1.cpp:1:
/usr/lib/gcc/i386-redhat-linux/4.1.2/../../../../include/c++/4.1.2/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 <iostream> instead of the deprecated header <iostream.h>. To disable this warning use -Wno-deprecated.
/tmp/ccYMN8qn.o: In function `__static_initialization_and_destruction_0(int, int)':
1.cpp.text+0x23): undefined reference to `std::ios_base::Init::Init()'
/tmp/ccYMN8qn.o: In function `__tcf_0':
1.cpp.text+0x6c): undefined reference to `std::ios_base::Init::~Init()'
/tmp/ccYMN8qn.o: In function `main':
1.cpp.text+0x96): undefined reference to `std::cout'
1.cpp.text+0x9b): undefined reference to `std::basic_ostream<char, std::char_traits<char> >& std:perator<< <std::char_traits<char> >(std::basic_ostream<char, std::char_traits<char> >&, char const*)'
1.cpp.text+0xac): undefined reference to `std::basic_ostream<char, std::char_traits<char> >:perator<<(float)'
1.cpp.text+0xbc): undefined reference to `std::basic_ostream<char, std::char_traits<char> >& std:perator<< <std::char_traits<char> >(std::basic_ostream<char, std::char_traits<char> >&, char const*)'
/tmp/ccYMN8qn.o: (.eh_frame+0x11): undefined reference to `__gxx_personality_v0'
collect2: ld returned 1 exit status
can any one please help me to solve this problem..??