现象
在内核编程时,出现错误信息如下:
export.h:36:1: error: function declaration isn’t a prototype [-Werror=strict-prototypes]
DLL_API bool comMain2();
分析
在内核编程中,参数为空时,必须声明为void。
解决
增加void即可,如下:
DLL_API bool comMain2(void);
微信扫一扫
在内核编程时,出现错误信息如下:
export.h:36:1: error: function declaration isn’t a prototype [-Werror=strict-prototypes]
DLL_API bool comMain2();
在内核编程中,参数为空时,必须声明为void。
增加void即可,如下:
DLL_API bool comMain2(void);
相关推荐