My compilation order is :
core1.c
top.c
core1.c contents :
#include "header1.h"
#include "header2.h"
void function1() {
---- }
void function2() {
---- }
header1.c contents function declarations, enums, includes :
#include comdef.h
void function1();
void function2();
top.c contents :
#include "header1.h"
#include "header2.h"
void main() {
function1();
function2();
}
I will add more headers and more core C files into my project. Each core.c file needs the same header files. How to get this all working, without the need to put #include header1/2.h in each core1.c, core2.c etc, and include these headers only in main.c ?