..\..\..\..\..\middlewares\Third_Party\bms-firmware\app\src\bms.h(530): error: #147-D: declaration is incompatible with "uint8_t GPIO_ReadInputDataBit(GPIO_Module *, uint16_t)" (declared at line 435 of "..\..\..\..\..\firmware\n32wb03x_std_periph_driver\inc\n32wb03x_gpio.h")
时间: 2023-07-12 10:05:18 浏览: 63
这个错误提示是因为你的代码中定义的某个函数与另一个头文件中定义的同名函数不兼容。这可能是因为函数的参数类型或返回类型不一致导致的。你需要检查代码中定义的该函数的参数和返回类型是否正确。
另外,你需要检查两个头文件中是否同时包含了该函数的声明,如果有需要将其删除一个。还有可能是头文件的依赖关系出现了问题,需要检查头文件的包含顺序是否正确。
如果你无法找到问题所在,可以把相关代码段贴出来,我可以帮你看看。
相关问题
'scrapy.spidermiddlewares.httperror.HttpErrorMiddleware'
'scrapy.spidermiddlewares.httperror.HttpErrorMiddleware' 是 Scrapy 框架中的一个中间件,用于处理 HTTP 错误。当 Scrapy 的 spider 发送请求时,如果返回的响应状态码不在允许的范围内(如 404),HttpErrorMiddleware 会捕获该错误并根据配置进行处理。它可以通过配置文件中的 HTTPERROR_MIDDLEWARES 设置来启用和配置。
..\..\..\..\..\middlewares\Third_Party\bms-firmware\app\src\bms.h(530): error: #79: expected a type specifier bool CHARGER_IS_PLUG_IN(); ..\..\..\..\..\middlewares\Third_Party\bms-firmware\app\src\bms.h(530): error: #79: expected a type specifier bool CHARGER_IS_PLUG_IN(); ..\..\..\..\..\middlewares\Third_Party\bms-firmware\app\src\bms.h(530): error: #18: expected a ")" bool CHARGER_IS_PLUG_IN(); ..\..\..\..\..\middlewares\Third_Party\bms-firmware\app\src\bms.h(530): error: #147-D: declaration is incompatible with "uint8_t GPIO_ReadInputDataBit(GPIO_Module *, uint16_t)" (declared at line 435 of "..\..\..\..\..\firmware\n32wb03x_std_periph_driver\inc\n32wb03x_gpio.h") bool CHARGER_IS_PLUG_IN();
这个错误提示是因为你的代码中定义的函数类型不正确。bool 是 C++ 的基本数据类型,但是在 C 语言中并没有定义该类型。你需要在代码中添加一个 bool 类型的定义,或者将 bool 替换为其他合适的类型,如 int 或 char。
另外,该函数的声明与另一个头文件中定义的同名函数的声明不兼容,可能是因为参数类型或返回类型不一致导致的。你需要检查两个头文件中函数的定义是否相同,如果不同需要将它们统一起来。
如果你无法找到问题所在,可以把相关代码段贴出来,我可以帮你看看。
相关推荐
![py](https://img-home.csdnimg.cn/images/20210720083646.png)
![py](https://img-home.csdnimg.cn/images/20210720083646.png)
![zip](https://img-home.csdnimg.cn/images/20210720083736.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)