I am using Linux as my programming platform and C language as my programming language.
My problem is, I define a structure in my main source file( main.c):
Putting it in a header file is the normal, correct way to declare types shared between source files.
Barring that, you can treat main.c as a header file and include it in the other file, then only compile the other file. Or you can declare the same struct in both files and leave a note to yourself to change it in both places.