Re: [AD] END_OF_MAIN, again

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


On 7/31/05, Chris <chris.kcat@xxxxxxxxxx> wrote:
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++.

There is way, but I don't know how "standard" it is. Both MSVC 6 and MinGW use C style name mangling for main in both C and C++. So I can put extern main() in wmain.c and it will work correctly. Need to do some research on this.


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