LinuxSir.cn,穿越时空的Linuxsir!

 找回密码
 注册
搜索
热搜: shell linux mysql
查看: 1440|回复: 2

自己升级的C++不能用?

[复制链接]
发表于 2002-8-16 13:05:14 | 显示全部楼层 |阅读模式
我用RH7.2+KDE3.0+gcc3.1 .我从网上下了gcc3.1(RPM包),根据倚赖关系提示下载了:binutils-2.12.90.0.4-1.i686.rpm,cpp-3.1-1.i686.rpm,gcc-3.1-1.i686.rpm,gcc-c++-3.1-1.i686.rpm,gcc-g77-3.1-1.i686.rpm
 楼主| 发表于 2002-8-16 13:07:21 | 显示全部楼层
编译时提示:
g++ -O0 -g3 -Wall -c -o main.o main.cpp
In file included from /usr/include/g++-v3/backward/iostream.h:31,
from main.cpp:22:
/usr/include/g++-v3/backward/backward_warning.h:32:2: warning: #warning This file includes at least one deprecated or antiquated header. Please use the header instead of header for 'C++' includes and use the header instead of header for 'C' includes. To disable this warning use -Wno-deprecated.
In file included from /usr/include/g++-v3/backward/iostream.h:32,
from main.cpp:22:
/usr/include/g++-v3/bits/std_iostream.h:39:28: bits/c++config.h: No such file or directory
In file included from /usr/include/g++-v3/bits/std_ios.h:39,
from /usr/include/g++-v3/bits/std_ostream.h:39,
from /usr/include/g++-v3/bits/std_iostream.h:40,
from /usr/include/g++-v3/backward/iostream.h:32,
from main.cpp:22:
/usr/include/g++-v3/bits/std_iosfwd.h:39:28: bits/c++config.h: No such file or directory
In file included from /usr/include/g++-v3/bits/std_iosfwd.h:40,
from /usr/include/g++-v3/bits/std_ios.h:39,
from /usr/include/g++-v3/bits/std_ostream.h:39,
from /usr/include/g++-v3/bits/std_iostream.h:40,
from /usr/include/g++-v3/backward/iostream.h:32,
from main.cpp:22:
/usr/include/g++-v3/bits/stringfwd.h:39:28: bits/c++config.h: No such file or directory
In file included from /usr/include/g++-v3/bits/std_iosfwd.h:41,
from /usr/include/g++-v3/bits/std_ios.h:39,
from /usr/include/g++-v3/bits/std_ostream.h:39,
from /usr/include/g++-v3/bits/std_iostream.h:40,
from /usr/include/g++-v3/backward/iostream.h:32,
from main.cpp:22:
/usr/include/g++-v3/bits/fpos.h:39:24: bits/c++io.h: No such file or directory
In file included from /usr/include/g++-v3/bits/fpos.h:40,
from /usr/include/g++-v3/bits/std_iosfwd.h:41,
from /usr/include/g++-v3/bits/std_ios.h:39,
from /usr/include/g++-v3/bits/std_ostream.h:39,
from /usr/include/g++-v3/bits/std_iostream.h:40,
from /usr/include/g++-v3/backward/iostream.h:32,
from main.cpp:22:
/usr/include/g++-v3/bits/std_cwchar.h:37:28: bits/c++config.h: No such file or directory
In file included from /usr/include/g++-v3/bits/std_iosfwd.h:41,
from /usr/include/g++-v3/bits/std_ios.h:39,
from /usr/include/g++-v3/bits/std_ostream.h:39,
from /usr/include/g++-v3/bits/std_iostream.h:40,
from /usr/include/g++-v3/backward/iostream.h:32,
from main.cpp:22:
/usr/include/g++-v3/bits/fpos.h:55: 'streamoff' is used as a type, but is not
defined as a type.
/usr/include/g++-v3/bits/fpos.h:69: parse error before `__off'
/usr/include/g++-v3/bits/fpos.h:70: missing ';' before right brace
/usr/include/g++-v3/bits/fpos.h:72: semicolon missing after declaration of `
std::fpos'
/usr/include/g++-v3/bits/fpos.h: In constructor `std::fpos::fpos()':
/usr/include/g++-v3/bits/fpos.h:67: class `std::fpos' does not have
any field named `_M_off'
/usr/include/g++-v3/bits/fpos.h: At global scope:
/usr/include/g++-v3/bits/fpos.h:72: parse error before `(' token
/usr/include/g++-v3/bits/fpos.h:72: ISO C++ forbids defining types within
return type
/usr/include/g++-v3/bits/fpos.h:72: syntax error before `(' token
/usr/include/g++-v3/bits/fpos.h:74: syntax error before `&' token
/usr/include/g++-v3/bits/fpos.h:77: syntax error before `&' token
/usr/include/g++-v3/bits/fpos.h:81: syntax error before `operator'
/usr/include/g++-v3/bits/fpos.h:84: syntax error before `+=' token
/usr/include/g++-v3/bits/fpos.h:89: syntax error before `operator'
/usr/include/g++-v3/bits/fpos.h:92: syntax error before `-=' token
/usr/include/g++-v3/bits/fpos.h:97: parse error before `&' token
/usr/include/g++-v3/bits/fpos.h:98: non-member function `bool operator==(...)'
cannot have `const' method qualifier
/usr/include/g++-v3/bits/fpos.h:98: `bool operator==(...)' must have an
argument of class or enumerated type
/usr/include/g++-v3/bits/fpos.h:98: `bool operator==(...)' must take exactly
two arguments
/usr/include/g++-v3/bits/fpos.h: In function `bool operator==(...)':
/usr/include/g++-v3/bits/fpos.h:98: `_M_off' undeclared (first use this
function)
/usr/include/g++-v3/bits/fpos.h:98: (Each undeclared identifier is reported
only once for each function it appears in.)
/usr/include/g++-v3/bits/fpos.h:98: `__pos' undeclared (first use this
function)
/usr/include/g++-v3/bits/fpos.h: At global scope:
/usr/include/g++-v3/bits/fpos.h:101: parse error before `&' token
/usr/include/g++-v3/bits/fpos.h:102: non-member function `bool operator!=(...)'
cannot have `const' method qualifier
/usr/include/g++-v3/bits/fpos.h:102: `bool operator!=(...)' must have an
argument of class or enumerated type
/usr/include/g++-v3/bits/fpos.h:102: `bool operator!=(...)' must take exactly
two arguments
/usr/include/g++-v3/bits/fpos.h:105: parse error before `)' token
/usr/include/g++-v3/bits/fpos.h:108: `streamoff' was not declared in this scope
/usr/include/g++-v3/bits/fpos.h:108: parse error before `)' token
/usr/include/g++-v3/bits/fpos.h: In function `void _M_position(...)':
/usr/include/g++-v3/bits/fpos.h:108: `__off' undeclared (first use this
function)
/usr/include/g++-v3/bits/fpos.h: At global scope:
/usr/include/g++-v3/bits/fpos.h:109: parse error before `}' token
/usr/include/g++-v3/bits/fpos.h:112: syntax error before `;' token
In file included from /usr/include/g++-v3/bits/std_ios.h:41,
from /usr/include/g++-v3/bits/std_ostream.h:39,
from /usr/include/g++-v3/bits/std_iostream.h:40,
from /usr/include/g++-v3/backward/iostream.h:32,
from main.cpp:22:
/usr/include/g++-v3/bits/char_traits.h:53: parse error before `;' token
/usr/include/g++-v3/bits/char_traits.h:54: parse error before `;' token
/usr/include/g++-v3/bits/char_traits.h:136: parse error before `;' token
/usr/include/g++-v3/bits/char_traits.h:137: parse error before `;' token
/usr/include/g++-v3/bits/char_traits.h: In static member function `static int
std::char_traits::eof()':
/usr/include/g++-v3/bits/char_traits.h:191: `EOF' undeclared (first use this
function)
In file included from /usr/include/g++-v3/bits/std_ios.h:42,
from /usr/include/g++-v3/bits/std_ostream.h:39,
from /usr/include/g++-v3/bits/std_iostream.h:40,
from /usr/include/g++-v3/backward/iostream.h:32,
from main.cpp:22:
/usr/include/g++-v3/bits/std_cstdio.h:37:28: bits/c++config.h: No such file or directory
In file included from /usr/include/g++-v3/bits/std_ios.h:43,
from /usr/include/g++-v3/bits/std_ostream.h:39,
from /usr/include/g++-v3/bits/std_iostream.h:40,
from /usr/include/g++-v3/backward/iostream.h:32,
from main.cpp:22:
/usr/include/g++-v3/bits/localefwd.h:39:28: bits/c++config.h: No such file or directory
/usr/include/g++-v3/bits/localefwd.h:40:55: bits/c++locale.h: No such file or directory
In file included from /usr/include/g++-v3/bits/localefwd.h:42,
from /usr/include/g++-v3/bits/std_ios.h:43,
from /usr/include/g++-v3/bits/std_ostream.h:39,
from /usr/include/g++-v3/bits/std_iostream.h:40,
from /usr/include/g++-v3/backward/iostream.h:32,
from main.cpp:22:
/usr/include/g++-v3/bits/std_string.h:39:28: bits/c++config.h: No such file or directory
In file included from /usr/include/g++-v3/bits/std_string.h:42,
from /usr/include/g++-v3/bits/localefwd.h:42,
from /usr/include/g++-v3/bits/std_ios.h:43,
from /usr/include/g++-v3/bits/std_ostream.h:39,
from /usr/include/g++-v3/bits/std_iostream.h:40,
from /usr/include/g++-v3/backward/iostream.h:32,
from main.cpp:22:
/usr/include/g++-v3/bits/std_iterator.h:60:28: bits/c++config.h: No such file or directory
In file included from /usr/include/g++-v3/bits/stl_iterator_base_funcs.h:69,
from /usr/include/g++-v3/bits/std_iterator.h:64,
from /usr/include/g++-v3/bits/std_string.h:42,
from /usr/include/g++-v3/bits/localefwd.h:42,
from /usr/include/g++-v3/bits/std_ios.h:43,
from /usr/include/g++-v3/bits/std_ostream.h:39,
from /usr/include/g++-v3/bits/std_iostream.h:40,
from /usr/include/g++-v3/backward/iostream.h:32,
from main.cpp:22:
/usr/include/g++-v3/bits/concept_check.h:35:28: bits/c++config.h: No such file or directory
In file included from /usr/include/g++-v3/bits/std_memory.h:49,
from /usr/include/g++-v3/bits/std_string.h:43,
from /usr/include/g++-v3/bits/localefwd.h:42,
from /usr/include/g++-v3/bits/std_ios.h:43,
from /usr/include/g++-v3/bits/std_ostream.h:39,
from /usr/include/g++-v3/bits/std_iostream.h:40,
from /usr/include/g++-v3/backward/iostream.h:32,
from main.cpp:22:
/usr/include/g++-v3/bits/stl_algobase.h:64:28: bits/c++config.h: No such file or directory
In file included from /usr/include/g++-v3/bits/stl_algobase.h:69,
from /usr/include/g++-v3/bits/std_memory.h:49,
from /usr/include/g++-v3/bits/std_string.h:43,
from /usr/include/g++-v3/bits/localefwd.h:42,
from /usr/include/g++-v3/bits/std_ios.h:43,
from /usr/include/g++-v3/bits/std_ostream.h:39,
from /usr/include/g++-v3/bits/std_iostream.h:40,
from /usr/include/g++-v3/backward/iostream.h:32,
from main.cpp:22:
/usr/include/g++-v3/bits/type_traits.h:49:28: bits/c++config.h: No such file or directory
In file included from /usr/include/g++-v3/bits/stl_algobase.h:73,
from /usr/include/g++-v3/bits/std_memory.h:49,
from /usr/include/g++-v3/bits/std_string.h:43,
from /usr/include/g++-v3/bits/localefwd.h:42,
from /usr/include/g++-v3/bits/std_ios.h:43,
from /usr/include/g++-v3/bits/std_ostream.h:39,
from /usr/include/g++-v3/bits/std_iostream.h:40,
from /usr/include/g++-v3/backward/iostream.h:32,
from main.cpp:22:
/usr/include/g++-v3/bits/std_cstdlib.h:37:28: bits/c++config.h: No such file or directory
In file included from /usr/include/g++-v3/bits/std_memory.h:50,
from /usr/include/g++-v3/bits/std_string.h:43,
from /usr/include/g++-v3/bits/localefwd.h:42,
from /usr/include/g++-v3/bits/std_ios.h:43,
from /usr/include/g++-v3/bits/std_ostream.h:39,
from /usr/include/g++-v3/bits/std_iostream.h:40,
from /usr/include/g++-v3/backward/iostream.h:32,
from main.cpp:22:
/usr/include/g++-v3/bits/stl_alloc.h: At global scope:
/usr/include/g++-v3/bits/stl_alloc.h:288: parse error before `[' token
/usr/include/g++-v3/bits/stl_alloc.h: In static member function `static void*
std::__default_alloc_template::allocate(unsigned int)':
/usr/include/g++-v3/bits/stl_alloc.h:331: parse error before `;' token
/usr/include/g++-v3/bits/stl_alloc.h: In static member function `static void
std::__default_alloc_template::deallocate(void*, unsigned
int)':
/usr/include/g++-v3/bits/stl_alloc.h:358: parse error before `;' token
/usr/include/g++-v3/bits/stl_alloc.h: In static member function `static char*
std::__default_alloc_template::_S_chunk_alloc(unsigned int,
int&)':
/usr/include/g++-v3/bits/stl_alloc.h:424: parse error before `*' token
/usr/include/g++-v3/bits/stl_alloc.h:433: parse error before `*' token
/usr/include/g++-v3/bits/stl_alloc.h: In static member function `static void*
std::__default_alloc_template::_S_refill(unsigned int)':
/usr/include/g++-v3/bits/stl_alloc.h:474: parse error before `*' token
/usr/include/g++-v3/bits/stl_alloc.h: At global scope:
/usr/include/g++-v3/bits/stl_alloc.h:538: syntax error before `
/usr/include/g++-v3/bits/stl_alloc.h:538: `__threads' was not declared in this
scope
/usr/include/g++-v3/bits/stl_alloc.h:538: `__inst' was not declared in this
scope
/usr/include/g++-v3/bits/stl_alloc.h:538: template argument 1 is invalid
/usr/include/g++-v3/bits/stl_alloc.h:538: template argument 2 is invalid
/usr/include/g++-v3/bits/stl_alloc.h:539: `__threads' was not declared in this
scope
/usr/include/g++-v3/bits/stl_alloc.h:539: `__inst' was not declared in this
scope
/usr/include/g++-v3/bits/stl_alloc.h:539: template argument 1 is invalid
/usr/include/g++-v3/bits/stl_alloc.h:539: template argument 2 is invalid
/usr/include/g++-v3/bits/stl_alloc.h:540: assignment (not initialization) in
declaration
/usr/include/g++-v3/bits/stl_alloc.h:571: parse error in method specification
before `{' token
/usr/include/g++-v3/bits/stl_alloc.h:571: parse error before `}' token
/usr/include/g++-v3/bits/stl_alloc.h:572: missing ';' before right brace
/usr/include/g++-v3/bits/stl_alloc.h:573: semicolon missing after declaration
of `std::allocator'
/usr/include/g++-v3/bits/stl_alloc.h:571: parse error at end of saved function
text
/usr/include/g++-v3/bits/stl_alloc.h:573: confused by earlier errors, bailing out
gmake: *** [main.o] Error 1
*** 失败 ***
请教是何原因,是不是缺少了哪个库?
 楼主| 发表于 2002-8-16 13:10:53 | 显示全部楼层
下载的包还有:
gcc-java-3.1-1.i686.rpm
gcc-objc-3.1-1.i686.rpm
libg2c-3.1-1.i686.rpm
libgcc-3.1-1.i686.rpm
libgcj-3.1-1.i686.rpm
libobjc-1.0.0-1.i686.rpm
您需要登录后才可以回帖 登录 | 注册

本版积分规则

快速回复 返回顶部 返回列表