Re: [AD] END_OF_MAIN, again

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


On Sunday 31 July 2005 07:24 am, Hrvoje Ban wrote:
> MSVC was throwing warning because I used AL_FUNC to declare _mangled_main
> and __install_allegro which add _declspec(dllimport), I switch to extern
> and it works fine.

How do you deal with the fact that _mangled_main can be defined 4 different 
ways:
int _mangled_main();
int _mangled_main(int argc);
int _mangled_main(int argc, char **argv);
int _mangled_main(int argc, char **argv, char **argz);

and it can be that in C or C++? Declaring 'extern int _mangled_main()' in 
wmain.c will cause the linker to expect a C-style _mangled_main symbol. 
However, in C++ the symbol will be different depending on the parameters, and 
will be incompatible with C-style symbols. So, the _mangled_main symbol will 
be missing in C++.




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