|Re: make: *** [main] Error 1 [message #783782 is a reply to message #783736]
||Thu, 26 January 2012 12:54
Registered: April 2010
On 1/26/2012 11:51 AM, Jamie Gardiner wrote:|
> Thanks Hagen, I just have a conflicting types error on line 13 now, but
> should be able to figure this out. Thanks again.
Another catch: Just naming a _file_ "main" means nothing to the actual
defined symbols. C/C++ is not Java (and even there you need to name
methods as expected by other components).
You _do_ need a function with the name "main" to please the linker. :-)
"main" needs a signature similar to "int main(int argc, char *argv)"
for the C runtime to link to it.
I'd recommend to only wrap this main as an "entry point routine" in an
'extern "C"' declaration and then call your actual work function from it.
[Sorry for the off-topic post: all of this is C/C++ 101, and has nothing
to do at all with Eclipse or CDT.]
Powered by FUDForum
. Page generated in 0.02068 seconds