This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

_main undefined

I have a sample application with a UML tool (Rhapsody) I use the default startup.a51 file, then I provide a idf3main.c file where main() is defined. When I compile / link then compilation looks fine, but the linker complains:

*** WARNING L2: REFERENCE MADE TO UNRESOLVED EXTERNAL
    SYMBOL:  MAIN
    MODULE:  C:\ND\KEIL\C51\LIB\C51L.LIB (?C_INIT)
When I look in the map file I can't find main, but _main instead. What do I do that my main is not converted to a _main symbol, thus enabling the linker to complete linkage.