??? 01/10/08 15:55 Read: times |
#149227 - Here! Responding to: ???'s previous message |
Erik, I have been trying many ways to make the compiler accept (COMPILE)the two or more .c files. This worked for me.
on Main.c I have a a main function called void Main (void) { } On Calc.c I created a main fuction like this. void Main_calc (void) { } The problem was that these two functions had the same name at first. void Main (void). I changed the name in one of them to Main_calc and it worked. Or I could simply errase it since it is not being called at all. PROBLEM ONE IS SOLVED AT LEAST USING TWO .C FILES. NO ERRORS AFTER COMPILED. NEXT: These two files Main.c and Calc.c share a common variable.h file. After compiling this is what I get: ERROR L104: MULTIPLE PUBLIC DEFINITIONS SYMBOL: "Name of variable defined" MODULE: Calc.obj (CALC) : : : Repeats the same message for 19 times, but with the names of the variables defined in variables.h Target not created ********************************************* Is there a problem with defining these variables in this .h file. Most of them will be used in Main.c, but some of them will be referenced in Calc.c. Do they need an "extern" prefix" I will keep trying. By the way I try not put too info so I do not get some people confused, and I do not think that makes anyone appear stupid. |