Les Beckham

CW6.6 - MPC555 - Link error: Static initializers must be called before 'main'

Discussion created by Les Beckham on Mar 28, 2007
Latest reply on Mar 30, 2007 by CrasyCat
I have created a new project by copying an existing (and working) project to a new directory.  I added one new C source file and one new C header file (and edited some existing C source and header files).  When I build (within the IDE) I get the following error:

Link Error   : Static initializers must be called before 'main'.
Please see '_ctors' in __ppc_eabi_init.cpp for example.

Project: ifc.mcp, Target: rom

I found a note in the file CLT_EABI_PPC_Tools_Notes.txt that indicates that -Cpp_exceptions should be turned off.  I checked the Target settings in the IDE and this option is turned off.  There are no C++ files in my project.

Why am I getting this error and how can I fix it?  Has anyone else seen this before?


Message Edited by Alban on 2007-03-28 08:28 PM