首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >cstdint string include int /usr/ c++>C11 /c++/8/cstdint:53:11: error:‘::int_fast8_t’尚未声明

cstdint string include int /usr/ c++>C11 /c++/8/cstdint:53:11: error:‘::int_fast8_t’尚未声明
EN

Stack Overflow用户
提问于 2020-02-07 23:46:32
回答 1查看 326关注 0票数 0

我有一个用C ++ 1996编写的程序,我想把它编译成C ++ 17。当我添加#include并且我被引用到cstdint时,我得到了一个错误消息。这缺少以下声明:

代码语言:javascript
复制
/ usr / include / c ++ / 8 / cstdint: 51: 11: error: ":: int64_t" has not been declared
   using :: int64_t;
           ^ ~~~~~~
/ usr / include / c ++ / 8 / cstdint: 53: 11: error: ":: int_fast8_t" has not been declared
   using :: int_fast8_t;
           ^ ~~~~~~~~~~
In file included from /usr/include/c++/8/bits/char_traits.h:503,
                 from / usr / include / c ++ / 8 / string: 40,
/ usr / include / c ++ / 8 / cstdint: 53: 11: error: ":: int_fast8_t" has not been declared
   using :: int_fast8_t;
           ^ ~~~~~~~~~~
/ usr / include / c ++ / 8 / cstdint: 54: 11: error: ":: int_fast16_t" has not been declared
   using :: int_fast16_t;
           ^ ~~~~~~~~~~~
/ usr / include / c ++ / 8 / cstdint: 55: 11: error: ":: int_fast32_t" has not been declared
   using :: int_fast32_t;
           ^ ~~~~~~~~~~~
/ usr / include / c ++ / 8 / cstdint: 56: 11: error: ":: int_fast64_t" has not been declared
   using :: int_fast64_t;
           ^ ~~~~~~~~~~~
/ usr / include / c ++ / 8 / cstdint: 58: 11: error: ":: int_least8_t" has not been declared
   using :: int_least8_t;
           ^ ~~~~~~~~~~~
/ usr / include / c ++ / 8 / cstdint: 59: 11: error: ":: int_least16_t" has not been declared
   using :: int_least16_t;
           ^ ~~~~~~~~~~~~
/ usr / include / c ++ / 8 / cstdint: 60: 11: error: ":: int_least32_t" has not been declared
   using :: int_least32_t;
           ^ ~~~~~~~~~~~~
/ usr / include / c ++ / 8 / cstdint: 61: 11: error: ":: int_least64_t" has not been declared
   using :: int_least64_t;
           ^ ~~~~~~~~~~~~
/ usr / include / c ++ / 8 / cstdint: 63: 11: error: ":: intmax_t" has not been declared
   using :: intmax_t;
           ^ ~~~~~~~
/ usr / include / c ++ / 8 / cstdint: 71: 11: error: ":: uint_fast8_t" has not been declared
   using :: uint_fast8_t;
           ^ ~~~~~~~~~~~
/ usr / include / c ++ / 8 / cstdint: 72: 11: error: ":: uint_fast16_t" has not been declared
   using :: uint_fast16_t;
           ^ ~~~~~~~~~~~~
/ usr / include / c ++ / 8 / cstdint: 73: 11: error: ":: uint_fast32_t" has not been declared
   using :: uint_fast32_t;
           ^ ~~~~~~~~~~~~
/ usr / include / c ++ / 8 / cstdint: 74: 11: error: ":: uint_fast64_t" has not been declared
   using :: uint_fast64_t;
           ^ ~~~~~~~~~~~~
/ usr / include / c ++ / 8 / cstdint: 76: 11: error: ":: uint_least8_t" has not been declared
   using :: uint_least8_t;
           ^ ~~~~~~~~~~~~
/ usr / include / c ++ / 8 / cstdint: 77: 11: error: ":: uint_least16_t" has not been declared

如果我用c ++ 98编译这个程序,我没有任何问题。

以前有没有人有过这种情况,或者你知道解决方案吗?

问候安德烈

EN

回答 1

Stack Overflow用户

发布于 2020-02-10 20:32:36

解决了我的程序,并很高兴分享它。经过大量的搜索,我意外地找到了CSTDINT /字符串问题的原因。

在#INCLUDE字符串中调用#INCLUDE CSTDINT函数,在#INCLUDE CSTDINT中调用#INCLUDE STDINT.H。现在在我的程序中也有一个stdint.h,在编译器中也有一个,这就产生了问题。

如何解决。在程序中找到stdint.h文件,并将其删除。这就是所有的人

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/60116761

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档