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):
It is perfectly reasonable to be inclusive with structs by leaving them in the source file instead. This is encapsulation. However if you're going to redefine struct multiple times in multiple source files then you might as well define the struct once in a header file instead and include that file as necessary.