Re: [AD] END_OF_MAIN, again

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


On Monday 01 August 2005 02:47 pm, Evert Glebbeek wrote:
> But if Allegro is compiled a a library, how does it know if it should call
> _mangled_cpp_main or _mangeled_c_main? In other words, it does not know -
> and should not care - if it is being linked against a C or a C++
> programme.

I think what he's doing is creating multiple files.. each one containing a 
different _mangled_main symbol. Depending on the way the user declares 
_mangled_main, the linker will use the matching file and ignore the others. 
Of course, since the user can use a C++ _mangled_main, there has to be 4 C++ 
files, each one with a different _mangled_main declaration. C is alright, 
since _mangled_main() and _mangled_main(int, char**) produce the same 
symbol.. the linker will match it fine, even if they have different 
arguments.




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