Main function not defined

M

MattFit

I just downloaded the LCC-Win Compiler and wrote the following program:

#include <stdio.h>
#include <stdlib.h>

int main(int argc, char *argv[]) {
printf("Hello World\n");
return 0;
}

And I get 'Function main is not defined.' Would anyone have an idea as to
why?
 
K

Keith Thompson

MattFit said:
I just downloaded the LCC-Win Compiler and wrote the following program:

#include <stdio.h>
#include <stdlib.h>

int main(int argc, char *argv[]) {
printf("Hello World\n");
return 0;
}

And I get 'Function main is not defined.' Would anyone have an idea as to
why?

comp.compilers.lcc would be a better place for that question. The
program looks ok (and the "#include <stdlib.h>" isn't necessary).
 
D

DHOLLINGSWORTH2

MattFit said:
I just downloaded the LCC-Win Compiler and wrote the following program:

#include <stdio.h>
#include <stdlib.h>

int main(int argc, char *argv[]) {
printf("Hello World\n");
return 0;
}

And I get 'Function main is not defined.' Would anyone have an idea as to
why?
I know nothing about LCC but what youve told me. You said "win" compiler
correct? That means it is looking for winmain not main. Look into the
documentation.
 
K

Keith Thompson

DHOLLINGSWORTH2 said:
MattFit said:
I just downloaded the LCC-Win Compiler and wrote the following program:

#include <stdio.h>
#include <stdlib.h>

int main(int argc, char *argv[]) {
printf("Hello World\n");
return 0;
}

And I get 'Function main is not defined.' Would anyone have an idea as to
why?
I know nothing about LCC but what youve told me. You said "win" compiler
correct? That means it is looking for winmain not main. Look into the
documentation.

No, lcc-win32 should be able to handle the above program. If it were
looking for "winmain", it wouldn't print an error messages saying it
can't find "main". As I wrote earlier, comp.compilers.lcc is the
place for this question. It's probably a configuration problem.
 
E

Emmanuel Delahaye

MattFit wrote on 26/02/05 :
I just downloaded the LCC-Win Compiler and wrote the following program:

#include <stdio.h>
#include <stdlib.h>

int main(int argc, char *argv[]) {
printf("Hello World\n");
return 0;
}

And I get 'Function main is not defined.' Would anyone have an idea as to
why?

That's a job for Jacob.

Hello Jacob, where are you ?

--
Emmanuel
The C-FAQ: http://www.eskimo.com/~scs/C-faq/faq.html
The C-library: http://www.dinkumware.com/refxc.html

"Clearly your code does not meet the original spec."
"You are sentenced to 30 lashes with a wet noodle."
-- Jerry Coffin in a.l.c.c++
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
474,159
Messages
2,570,881
Members
47,418
Latest member
NoellaXku

Latest Threads

Top