I need to define some structs and constants to be used by 2 different programs that will use them for communication.
I'm trying to figure out how to use headers files. I've read as much as I could about it.
This is what I figured so far:
- you need a .h file for prototypes and a .c for the code that goes with those prototypes
This is what I want to find out:
- How to link those 2 files in a makefile
- For structs what part goes in the .h file and what in the .c file
- How to define constants
- Do the .h and .c files need to in the same place as the makefile?
Thanks in advance