Code::Blocks Forums
User forums => General (but related to Code::Blocks) => Topic started by: Roy Strachan on May 18, 2010, 11:58:14 pm
-
When trying to compile a simple test program I get the error: "In function `_start': Undefined reference to main". Of course there is a 'main' in my program (but no '_start', which must be a control in c::b). Does anyone know how to get past this?
-
When trying to compile a simple test program I get the error: "In function `_start': Undefined reference to main". Of course there is a 'main' in my program (but no '_start', which must be a control in c::b). Does anyone know how to get past this?
This is a Compiler (Linker) Error; without knowing your compiler the only thing to think is wrong is user error (or bad compiler).
http://wiki.codeblocks.org/index.php?title=FAQ#Q:_How_do_I_troubleshoot_an_compiler_problem.3F
Your likely typo-ed the word main (case-sensitive) or the arguments it takes or the return type.
Tim S.
-
My problem when I got this message turned out to be a file name problem. I had named my main module 'main.cc'. I removed it from the project, renamed it to 'main.cxx', and added it back into the project. The error disappeared.
:D