Re: [AD] END_OF_MAIN, again

[ Thread Index | Date Index | More lists.liballeg.org/allegro-developers Archives ]


On Tuesday 09 August 2005 12:18 am, Hrvoje Ban wrote:
> If current language is C++ (#ifdef __cplusplus) it will
> declare _mangled_main(int, char **) as extern "C".

But the user won't be declaring _mangled_main as extern "C", so it'll still be 
a regular C++ symbol. And you'd need three, if not four, cppmain.cpp files. 
Each one for:
int main();
int main(int argc);
int main(int argc, char **argv);

and possibly:
int main(int argc, char **argv, char **argz);

They'll all produce different symbols in C++, unlike C, so you need to account 
for them.




Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/