ubuntu gcc错误ctype未在此范围内声明

时间:2013-08-01 10:28:28

标签: ubuntu gcc g++

我今天遇到了这个问题。我昨天可以在ubuntu 12.04中使用QT4编译项目,但今天我发现由于这些错误,无法编译任何c ++项目。我已将系统升级到最新版本。

有人给我一些建议吗?谢谢。

/usr/include/c++/4.6/bits/locale_facets.h:2561:50: error: ‘ctype_base’ has not been declared
/usr/include/c++/4.6/bits/locale_facets.h:2543:14: note: suggested alternative:
/usr/include/c++/4.6/bits/locale_classes.tcc:107:5: note:   ‘std::use_facet’
/usr/include/c++/4.6/bits/locale_facets.h: At global scope:
/usr/include/c++/4.6/bits/locale_facets.h:2566:5: error: ‘isdigit’ declared as an ‘inline’ variable
/usr/include/c++/4.6/bits/locale_facets.h:2543:24: error: ‘ctype’ was not declared in this scope
/usr/include/c++/4.6/bits/locale_facets.h:2566:5: error: template declaration of ‘bool isdigit’
/usr/include/c++/4.6/bits/locale_facets.h:2543:24: note: suggested alternative:
/usr/include/c++/4.6/bits/locale_facets.h:2567:7: error: expected primary-expression before ‘return’
/usr/include/c++/4.6/bits/locale_facets.h:2567:7: error: expected ‘}’ before ‘return’/usr/include/c++/4.6/bits/localefwd.h:123:11: note:   ‘std::ctype’

/usr/include/c++/4.6/bits/locale_facets.h:2567:75: error: expected declaration before ‘}’ token
/usr/include/c++/4.6/bits/locale_facets.h:2543:36: error: expected primary-expression before ‘>’ token
/usr/include/c++/4.6/bits/locale_facets.h:2543:38: error: expected primary-expression before ‘>’ token
/usr/include/c++/4.6/bits/locale_facets.h:2543:47: error: request for member ‘is’ in ‘__loc’, which is of non-class type ‘const int’
/usr/include/c++/4.6/bits/locale_facets.h:2543:50: error: ‘ctype_base’ has not been declared
/usr/include/c++/4.6/bits/locale_facets.h: At global scope:
/usr/include/c++/4.6/bits/locale_facets.h:2548:31: error: ‘locale’ does not name a type
/usr/include/c++/4.6/bits/locale_facets.h: In function ‘bool isupper(_CharT, const int&)’:
/usr/include/c++/4.6/bits/locale_facets.h:2549:14: error: ‘use_facet’ was not declared in this scope
/usr/include/c++/4.6/bits/locale_facets.h:2549:14: note: suggested alternative:
/usr/include/c++/4.6/bits/locale_classes.tcc:107:5: note:   ‘std::use_facet’
/usr/include/c++/4.6/bits/locale_facets.h:2549:24: error: ‘ctype’ was not declared in this scope
/usr/include/c++/4.6/bits/locale_facets.h:2549:24: note: suggested alternative:
/usr/include/c++/4.6/bits/localefwd.h:123:11: note:   ‘std::ctype’
/usr/include/c++/4.6/bits/locale_facets.h:2549:36: error: expected primary-expression before ‘>’ token
/usr/include/c++/4.6/bits/locale_facets.h:2549:38: error: expected primary-expression before ‘>’ token
/usr/include/c++/4.6/bits/locale_facets.h:2549:47: error: request for member ‘is’ in ‘__loc’, which is of non-class type ‘const int’
/usr/include/c++/4.6/bits/locale_facets.h:2549:50: error: ‘ctype_base’ has not been declared
/usr/include/c++/4.6/bits/locale_facets.h: At global scope:
/usr/include/c++/4.6/bits/locale_facets.h:2554:31: error: ‘locale’ does not name a type
/usr/include/c++/4.6/bits/locale_facets.h: In function ‘bool islower(_CharT, const int&)’:
/usr/include/c++/4.6/bits/locale_facets.h:2555:14: error: ‘use_facet’ was not declared in this scope
/usr/include/c++/4.6/bits/locale_facets.h:2555:14: note: suggested alternative:
/usr/include/c++/4.6/bits/locale_classes.tcc:107:5: note:   ‘std::use_facet’
/usr/include/c++/4.6/bits/locale_facets.h:2555:24: error: ‘ctype’ was not declared in this scope
/usr/include/c++/4.6/bits/locale_facets.h:2555:24: note: suggested alternative:
/usr/include/c++/4.6/bits/localefwd.h:123:11: note:   ‘std::ctype’
/usr/include/c++/4.6/bits/locale_facets.h:2555:36: error: expected primary-expression before ‘>’ token
/usr/include/c++/4.6/bits/locale_facets.h:2555:38: error: expected primary-expression before ‘>’ token
/usr/include/c++/4.6/bits/locale_facets.h:2555:47: error: request for member ‘is’ in ‘__loc’, which is of non-class type ‘const int’
make[2]: *** 
/usr/include/c++/4.6/bits/locale_facets.h: At global scope:
/usr/include/c++/4.6/bits/locale_facets.h:2560:31: error: ‘locale’ does not name a type
/usr/include/c++/4.6/bits/locale_facets.h: In function ‘bool isalpha(_CharT, const int&)’:
/usr/include/c++/4.6/bits/locale_facets.h:2561:14: error: ‘use_facet’ was not declared in this scope
/usr/include/c++/4.6/bits/locale_facets.h:2561:14: note: suggested alternative:
/usr/include/c++/4.6/bits/locale_classes.tcc:107:5: note:   ‘std::use_facet’
/usr/include/c++/4.6/bits/locale_facets.h:2561:24: error: ‘ctype’ was not declared in this scope
/usr/include/c++/4.6/bits/locale_facets.h:2561:24: note: suggested alternative:
/usr/include/c++/4.6/bits/localefwd.h:123:11: note:   ‘std::ctype’
/usr/include/c++/4.6/bits/locale_facets.h:2561:36: error: expected primary-expression before ‘>’ token
/usr/include/c++/4.6/bits/locale_facets.h:2561:38: error: expected primary-expression before ‘>’ token
/usr/include/c++/4.6/bits/locale_facets.h:2561:47: error: request for member ‘is’ in ‘__loc’, which is of non-class type ‘const int’
/usr/include/c++/4.6/bits/locale_facets.h:2561:50: error: ‘ctype_base’ has not been declared
/usr/include/c++/4.6/bits/locale_facets.h: At global scope:
/usr/include/c++/4.6/bits/locale_facets.h:2566:5: error: ‘isdigit’ declared as an ‘inline’ variable
/usr/include/c++/4.6/bits/locale_facets.h:2566:5: error: template declaration of ‘bool isdigit’
/usr/include/c++/4.6/bits/locale_facets.h:2567:7: error: expected primary-expression before ‘return’
/usr/include/c++/4.6/bits/locale_facets.h:2567:7: error: expected ‘}’ before ‘return’
/usr/include/c++/4.6/bits/locale_facets.h:2567:75: error: expected declaration before ‘}’ token
make[2]: *** 

0 个答案:

没有答案