Error: Multiple definition of '_main'...
HI,
As u may think, I am new to C programing and as I was making programs in C, my first program was successfully compiled while all the programs that followed contained load of errors; the main being :(
<<Error: Multiple definition of '_main'>>
I think that the first program that was compiled has a 'main' that links with all the other programs that I want to create.
Can anyone tell me what is the way out for creating other programs without this error??
By the way, I am using DJGPP's C compiler on a win98 PC.
Is there something that I have to change the properties anywhere??
Any help appreciated.
Re: Error: Multiple definition of '_main'...
As I am new to C programing, I dont know about the linking of the *.c files. What I mean to say is that first I made my first C program named 'HelloWorld.c' and next I wanted to make another C program relating to addition of 2 numbers <add.c>.
Now, HelloWorld.c runs perfectly without errors, but the other programs that I want to write, are not compiled properly and are with loads of errors that I don't think have any.
i.e. add.c when compiled says:::
Error: Multiple definition of '_main' with other errors following it.
When I point to this error, the DJGPP program takes me back to the 'main' statement I wrote in HelloWorld.c .