Quote Originally Posted by Salem
Well what error messages do you get when you have a project containing
main2.c test.c function.c

For example, if main2.c and test.c contain a main() for example, then one of them has to be renamed when you put both files into the same project.
For example, a constant defined in main2.c is not visible in any other of the files! How can I make a constant global?!? I thought a constant was ALWAYS global!

If I compile main2-c out of a project, ALL files compile fine; but if I add all files into a project, when I try compiling main.c the compiler complains about test.c not finding declaration for a global constant defined in main.c !
But main.c starts with:

#include "test.c"
#include "function.c"
#include "test.h"


Actually my program is the only one where I've ever seen .C files included... so there should be something I don't understand here...

Let's summarize:

test.h holds the structure to read test.txt configuration file;
test.c holds the procedure to read the conf file;
function.c holds functions which use parameters read from test.txt;
main2.c should call functions in function.c and display the values they return.

So, how should I organize my sources into a project?? Which #include statement should I use, and WHERE?