Keil 工程出现 error: #757: variable "uint32_t" is not a type name的一次纠错历程(最后没解决)
来源:互联网 发布:mac在哪里下载软件 编辑:程序博客网 时间:2024/06/06 16:28
今天在做代码练习的时候,本来是照着网上的代码拷贝下来的,应该不会有错,但是编译的时候却报了一堆错误,具体内容如下
主要是这个错误error: #757: variable "uint32_t" is not a type name,英语不太好,但能看出大致的意思是"变量uint_32_t并不是一个变量类型",这不是关键,主要是在引用的核心文件出现错误,这些地方应该是已经做好的文件,不应该出错的才对.因此果断判定是我的配置有问题,于是百度了一下,表示我没有添加#include <stdint.h>这个头文件,于是试着在工程添加了一下这个头文件并再次编译
好像并没有什么卵用,不该出现的错误像狗皮膏药似的也没有拔掉,不清楚是哪里出现了问题,我又把stdint.h这个头文件打开来看了看,到底是哪里出现了问题?发现在这里做了一些定义:
按道理说不应该在出现那些错误才对,真搞不明白是哪里出现了问题,又百度了一下"uing_32_t"好像有看到uing_32_t只能在c++中使用,所以我又往上翻了一下,发现了这个
这是不是表示我的代码如果没有定义__cplusplus是不是就没有办法正常使用uing_32_t啊,于是我又在宏定义中加了__cplusplus
再次编译
之前的uing_32_t变量类型的错误倒是消失的一干二净,本来以为这个问题解决了,但是这些错误是闹哪样啊?在
标准头文件stdint.h中又出现了一大堆错误,至此我已经认定.肯定是我的编译器有毒,绝对有毒,给我闹各种bug.
外国友人给出的答案,大概是是我目前使用的keil不支持c++编译器,白忙活一天.好失败.
希望有大神能够帮我解释一下这是什么原因?
error: #757: variable "uint32_t" is not a type name
在加入__cplusplus后错误位于stdint.h
~\stdint.h(20): error: #20: identifier "namespace" is undefined
- Keil 工程出现 error: #757: variable "uint32_t" is not a type name的一次纠错历程(最后没解决)
- variable "channel_Typ87): error: #757: variable "channel_Typedef" is not a type name extern cha
- error: 'uint32_t' does not name a type with gcc 4.4 compile
- opencv2.0 源码安装 for x86 make出现error: 'ptrdiff_t' does not name a type 解决
- keil中error: #70: incomplete type is not allowed——已解决!
- 解决MATLAB出现Warning: Name is nonexistent or not a directory的办法
- error :does not name a type
- error: ‘ptrdiff_t’ does not name a type
- error: 'uid_t' does not name a type
- error: ‘ptrdiff_t’ does not name a type
- error: ‘ptrdiff_t’ does not name a type
- error: 'uint8_t' does not name a type
- error: 'vector' does not name a type
- ERROR:shared_ptr does not name a type
- error: 'vector' does not name a type
- `QtValidLicenseForCoreModule' does not name a type 错误的解决
- error: '[class name]' does not name a type
- error: ‘string’ does not name a type string name;
- 文章标题
- 指向指针的指针
- lnmp
- JdbcTemplate 、NamedParameterJdbcTemplate、SimpleJdbcTemplate的区别
- 高级控件Spinner
- Keil 工程出现 error: #757: variable "uint32_t" is not a type name的一次纠错历程(最后没解决)
- 4 Have Fun with Numbers
- linux下cpio.gz文件的解压方法
- 计算在UITableView中的UICollectionView的高度(自适应)(iOS10可用)
- 将从数据库中读出的带html标签的数据转化为正常的带样式的文字
- Yii 框架里数据库操作详解-[增加、查询、更新、删除的方法 'AR模式']
- 121. Best Time to Buy and Sell Stock
- 'com.android.support:support-annotations' 问题解决方法
- 新手快速入门Docker最新版管理工具