You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Structure Definition accessing in the test file #803
I have a source file called SourceA.c in which I have a structure definition and global structure object. I created a test file (test_SourceA.c) to test the SourceA.c and I have externed the global structure object but the compilation fails because the compiler cannot find the structure in the file which is understood. How are these issues generally tackled ? I know that I can simply move the structure definition to a .h file but I am just thinking if there is a better way as there is no need for the definition to be in the .h file.
Activity
Letme commentedon Sep 12, 2025
typedef goes to header file. If you want to keep it as private API i suggest you create sourceA_private.h to indicate this type is for private stuff.