

分析:
这个原因是由于包含头文件有误导致的,我在某个C头文件中包含了C++头文件,报错
解决:
C文件包含C++文件方法如下:
#ifdef __cplusplus //bsp_GPIO.h .c 被 cpp文件引用,需要如此添加
extern "C" {
#endif
//----------本文件需要引出的函数----------//
int GPIO_OutEnable(int fd, unsigned int dwEnBits);
int GPIO_OutDisable(int fd, unsigned int dwDisBits);
int GPIO_OpenDrainEnable(int fd, unsigned int dwODBits);
int GPIO_OutSet(int fd, unsigned int dwSetBits);
int GPIO_OutClear(int fd, unsigned int dwClearBits);
int GPIO_PinState(int fd, unsigned int* pPinState);
int GPIO_IrqEnable(int fd, unsigned int dwEnBits);
#ifdef __cplusplus
}
#endif
注:C文件不可以引用C++文件,在现实当中,只能够在C++里面引用c文件,不可以在C中引用CPP文件,除非你的CPP文件里完全是使用C写的代码。子集要用超集,这从逻辑上是不成立的.