I've always been taught that the typical practice for external functions shared across modules is to define in source files and declare in header files. However, I have a struct that I'm trying to share across modules, and the only way I've been able to make the compiler not complain is to define the struct in the header file, then declare the struct in the source files.
Yes I have. Just edited my post to include my #include heirarchy.
As I stated above, if I define the struct in midi.h, then declare the struct in midi.c and main.c, it works. But I'd rather define the struct in midi.c, then declare it in midi.h and as extern in main.c.
With some reading and research, I figured it out. Because structs are like classes in C++, the entire struct body must be declared in the header file in order to access the struct members. You then declare the instance variable once as an extern in the header file, and once as a global in a source file. The linker will do the magic from there.