I'm working on a GUI library in C for a school work, but I've got a problem with header files (I think). I have a function "rectangle_coordinates" in a "draw.c" file, with the adequate "draw.h" header file, and in a file "widget_frame.c" I call this function, after including the "draw.h" header file. But I still got a warning :
./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);
Do you have an idea that can fix my problem ?
At a minimum, all things below should be verified and corrected (if needed).
In draw.h
you should have something like:
extern /type/ rectangle_coordinates(&frame_to_draw, &xmin, &xmax, &ymin, &ymax);
where:
In both draw.c
and ei_widget_frame.c
you should have:
#include "draw.h"
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.