Path: chuka.playstation.co.uk!scea!greg_labrec@interactive.sony.com From: "Wayne K. Werner" Newsgroups: scea.yaroze.programming.codewarrior Subject: Re: __static_init conflict Date: 8 Jul 1997 22:27:32 GMT Organization: SCEA Net Yaroze News Lines: 27 Message-ID: <01bc8bee$297768a0$a4bf43ce@wkwerner> References: <01bc8964$21353000$94bf43ce@wkwerner> <01bc8a88$99e77740$d3bf43ce@wkwerner> <33C0B3DA.69D7@bc.sympatico.ca> NNTP-Posting-Host: port64.con2.com X-Newsreader: Microsoft Internet News 4.70.1155 Nick Porcino wrote: > 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 > If it is indeed a function pointer the declaration in __rts_info_t__.h is adequate. There is no need for a linkage specifier on a pointer, only a function prototype. If you just comment out the __static_init declaration in _psstart.c, everything should be fine. Actually, if the linkage specifier on the function pointer actually did something, the compiler would have to complain that you were redefining the symbol __static_init, since it is declared in the above mentioned header without the extern "C" modifier. Anyhow, I'm with you... I think it's a function pointer, but I would really like confirmation from the MWs guys. Wayne