[Solved] Declaring a function in a header file which references structs defined in different header files


You will need to include file1.h and file2.h in file3.h instead of file3.c. As func3 uses struct1 and struct2, you can’t declare it without having the declarations of the structs on hand. Don’t be tempted to redeclare the structs in file3.h.

solved Declaring a function in a header file which references structs defined in different header files