MetroWerks CodeWarrior Compiler Version 4.2

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 

MetroWerks CodeWarrior Compiler Version 4.2

4,909 次查看
AnilAbraham
Contributor I
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
标签 (1)
标记 (1)
0 项奖励
回复
3 回复数

1,599 次查看
J2MEJediMaster
Specialist I
Need a little more info here... Are you targeting PowerPC or ColdFire? What is the RTOS? Is this a code port from somewhere else?

---Tom

0 项奖励
回复

1,599 次查看
AnilAbraham
Contributor I
Hi Tom,

I am using CodeWarrior for PowerPC architecture to compile the RTOS OSE5.2 from Enea. The compiler is part of the CodeWarrior Professional Edition version 8.7.

Version of the compiler is

Metrowerks C/C++ Compiler for Embedded PowerPC.
Copyright (c) 2006, Freescale Semiconductor, Inc.
All rights reserved.
Version 4.1 build 60725
Runtime Built: Mar  9 2007 17:41:14

Usage: mwcceppc.exe [-options]... [files]... [@response]...

Please enter 'mwcceppc.exe -help' for information about options.

But interestingly i have a little older version of the same compiler from a previous installation, here it just gives only a warning.

Version of the compiler is
$
Metrowerks C/C++ Compiler for Embedded PowerPC.
Copyright (c) 2006, Freescale Semiconductor, Inc.
All rights reserved.
Version 4.1 build 60725
Runtime Built: Jul 25 2006 20:39:38

Usage: mwcceppc.exe [-options]... [files]... [@response]...

Please enter 'mwcceppc.exe -help' for information about options.

-Anil
0 项奖励
回复

1,599 次查看
CrasyCat
Specialist III
Hello
 
This is something that needs to be investigated by our support team.
 
I would recommend you to submit a service request for that.

Click here to submit a service request.

Make sure to attach a reproducible project and installed product information to the service request.
To generate the required information:
- Start CodeWarrior
- Open the project
- Select "Help" -> "Pack and Go" and follow instructions on the screen.

Attach the generated .zip file to the SR.
 
CrasyCat
0 项奖励
回复