我今天遇到了这个问题。昨天可以在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]: ***