How to compile a C project with more than one main function?
Posted
by Daziplqa
on Stack Overflow
See other posts from Stack Overflow
or by Daziplqa
Published on 2010-05-21T05:25:25Z
Indexed on
2010/05/21
5:30 UTC
Read the original article
Hit count: 237
Hi folks,
I am new to C, and now read some textbook and going to apply its examples.
The problem is, whenever I creates a new project and try to put more than one file that contains a main function, the linker (as I thougt0 explains saying:
/home/mohammed/tmp/abcd/main.c:4: multiple definition of `main'
(BTW, I used many IDEs, MonoDevelop, QT creator, VS2010, Codebloks, ...) I am currently uses QT Creator, It seems to be a very nice IDE.
So, there's not a workaround to solve such problem??
© Stack Overflow or respective owner