Anil Abraham

MetroWerks CodeWarrior Compiler Version 4.2

Discussion created by Anil Abraham on Aug 23, 2007
Latest reply on Aug 24, 2007 by CrasyCat
Hi,

I have a piece of code in my source file. This is called from one of the RTOS kernel startup routines.

exit(main(argc, argv));

similarily at some other location

main(0, (char **) 0);

I am getting the compilation error:

### mwcceppc.exe Compiler:
#    File: ..\..\common\osemain.c
# -------------------------------
#    1557:   main(argc, argv);
#   Error:                  ^
#   'main()' cannot be called or referenced by address
### mwcceppc.exe Compiler:
#    1801:    main(0, (char **) 0);
#   Error:                       ^
#   'main()' cannot be called or referenced by address

Errors caused tool to abort.

Any clues as what could be going wrong ??

TIA,
Anil

Outcomes