Path: chuka.playstation.co.uk!scea!greg_labrec@interactive.sony.com From: Nick Porcino Newsgroups: scea.yaroze.programming.codewarrior Subject: Re: __static_init conflict Date: Mon, 07 Jul 1997 01:16:14 -0800 Organization: SCEA Net Yaroze News Lines: 33 Message-ID: <33C0B3DA.69D7@bc.sympatico.ca> References: <01bc8964$21353000$94bf43ce@wkwerner> <01bc8a88$99e77740$d3bf43ce@wkwerner> NNTP-Posting-Host: vcta01m02-107.bctel.ca Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Mailer: Mozilla 3.01-C-SYMPA (Macintosh; I; PPC) To: "Wayne K. Werner" Wayne wrote: >>>>>>>> The question remains: Only one of these is valid. Is the linker symbol the address of a pointer to a linker supplied function, or is the linker symbol the address of the function itself? I have assumed that the answer is a pointer to the function. I have commented out the declaration in _psstart.c. So far, I have things linking and appearing to work, however I would like a definitive answer to this from someone in MW (is there anybody out there?) <<<<<<<< I'm not with Metrowerks, but anyway, I believe it's a pointer to a function, and I've modified the lines in _psstart.c as follows: #ifdef __cplusplus extern "C" void (*__static_init)(); // np added (*...) around symbol extern "C" void InitHeap(); #else extern void InitHeap(); #endif This works correctly... One problem I had before I got this far was that _psstart.c is compiled by the C compiler. Note that it is necessary in the project settings to check the Activate C++ checkbox to make everything work properly. - nick porcino