Hi Everybody,
I'm new to codewarrior and I'm working on energy meter project. I got a reference code for this project and when I compile it I get the following error msg.
Link Error : Undefined : "main"
Referenced from "_startup" in
Link failed.
What does this error msg mean and how do I solve it?
I'm using the codewarrior version 6.3. But the actual project was done in an older version. Could that be the reason for the error.
Solved! Go to Solution.
It means that the linker can't find a function named main() in your program. "Startup" is the CW default code that gets executed after MCU reset, and it calls main().
It means that the linker can't find a function named main() in your program. "Startup" is the CW default code that gets executed after MCU reset, and it calls main().
Thanks for the quick reply.
Ive checked the code and the main() fn is defined. Then why is this error still occurring?
oh sorry ... you were right. It was because the startup was calling Main() and the ref code was using main().
thanks a lot