|
一个程序,在windows下用VC++编译过了.
在windows下E盘,mount过来后,用gcc编译,报了一大堆错,
是不是没有库函数?
我是新手,一点头绪也没有.请教教我.
下面的报的错.
- $ gcc -o 1457 1457.cpp
- /tmp/cc6HG0YP.o(.text+0x80): In function `rev_ring(int)':
- : undefined reference to `std::cout'
- /tmp/cc6HG0YP.o(.text+0x85): In function `rev_ring(int)':
- : undefined reference to `std::basic_ostream<char, std::char_traits<char> >::operator<<(int)'
- /tmp/cc6HG0YP.o(.text+0x8e): In function `rev_ring(int)':
- : 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)'
- /tmp/cc6HG0YP.o(.text+0xb1): In function `rev_ring(int)':
- : undefined reference to `std::cout'
- /tmp/cc6HG0YP.o(.text+0xb6): In function `rev_ring(int)':
- : undefined reference to `std::basic_ostream<char, std::char_traits<char> >::operator<<(int)'
- /tmp/cc6HG0YP.o(.text+0xbf): In function `rev_ring(int)':
- : 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)'
- /tmp/cc6HG0YP.o(.text+0x19d): In function `main':
- : undefined reference to `std::cin'
- /tmp/cc6HG0YP.o(.text+0x1a2): In function `main':
- : undefined reference to `std::basic_istream<char, std::char_traits<char> >::operator>>(int&)'
- /tmp/cc6HG0YP.o(.text+0x1b7): In function `main':
- : undefined reference to `std::basic_ios<char, std::char_traits<char> >::operator void*() const'
- /tmp/cc6HG0YP.o(.text+0x1d3): In function `main':
- : undefined reference to `std::cout'
- /tmp/cc6HG0YP.o(.text+0x1d8): 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)'
- /tmp/cc6HG0YP.o(.text+0x1f8): In function `main':
- : undefined reference to `std::cout'
- /tmp/cc6HG0YP.o(.text+0x1fd): 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/cc6HG0YP.o(.text+0x206): In function `main':
- : undefined reference to `std::basic_ostream<char, std::char_traits<char> >::operator<<(int)'
- /tmp/cc6HG0YP.o(.text+0x20f): 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/cc6HG0YP.o(.text+0x2c0): In function `__static_initialization_and_destruction_0(int, int)':
- : undefined reference to `std::ios_base::Init::Init[in-charge]()'
- /tmp/cc6HG0YP.o(.text+0x2ef): In function `__tcf_0':
- : undefined reference to `std::ios_base::Init::~Init [in-charge]()'
- /tmp/cc6HG0YP.o(.eh_frame+0x11): undefined reference to `__gxx_personality_v0'
- collect2: ld returned 1 exit status
复制代码 |
|