Re: [AD] END_OF_MAIN, again |
[ Thread Index |
Date Index
| More lists.liballeg.org/allegro-developers Archives
]
On Monday 01 August 2005 23:28, Hrvoje Ban wrote:
> First in alwin.h I make that in case file is C++ main is defined to
> _mangled_cpp_main, else _mangeled_c_main.
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.
> In wmain.c I forward declare
> _mangled_c_main(int, char *[]), _mangled_cpp_main() and
> _mangled_cpp_main(int, char *[]) and assign they address to pointers and
> invoke all three in WinMain.
What about _mangled_c_main(void)? Why can't you define one and just call
that? Also, Allegro is a C library. It can't contain C++ code.
Can you please repeat why you are doing it this way?
Evert