I always wrote C programs limited to a single .C file including some standard .H; now I need to write a larger project, including several .C files, plus some .H written by me; I read several tutorials, bu I can't find anything about "linkage" more than "you need to link files together". Ok, but, HOW?

I have to extend an existing project consisting of several .c and .h files; I wrote, let's say, test.c and test.h . Then I modified an existing function.c file, which now refers to test.h for the structure used by test.c to read and interpret a configuration file.

I wrote a separate main2.c file which starts the function inside test.c which reads the file, and then calls the new-added functions in function.c which process the data.

I am using Dev-C++, and if I edit single files and compile main2.c all work fine; but if I create a project which includes all files (new and old ones), compilation files: compiler complains about missing links to files, or double-links once I add the missing one! So, I don't understand where I should add proper #include statement. Or maybe it's just a mis-configuration of the program, or of the project?

What I actually need is the original project to be able to read the configuration file, through my additions, before doing anything else.

I know it sounds a bit confusing... that's why I'm here asking for help!