![](/img/trans.png)
[英]How to fix implicit declaration of function during compilation of android kernel
[英]How to fix “ implicit declaration of function”
我正在使用C的GUI库进行学校作业,但是头文件存在问题(我认为)。 我在“ draw.c”文件中有一个函数“ rectangle_coordinates”,带有足够的“ draw.h”头文件,在文件“ widget_frame.c”中,我在包含“ draw.h”头之后调用了此函数文件。 但是我仍然得到警告:
./src/ei_widget_frame.c:40:5: warning: implicit declaration of function 'rectangle_coordinates' [-Wimplicit-function-declaration]
rectangle_coordinates(&frame_to_draw, &xmin, &xmax, &ymin, &ymax);
您有解决我问题的想法吗?
至少,应验证和纠正以下所有内容(如果需要)。
在draw.h
您应该具有以下内容:
extern /type/ rectangle_coordinates(&frame_to_draw, &xmin, &xmax, &ymin, &ymax);
哪里:
在draw.c
和ei_widget_frame.c
您都应具有:
#include "draw.h"
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.