Re: [AD] END_OF_MAIN, again |
[ Thread Index |
Date Index
| More lists.liballeg.org/allegro-developers Archives
]
- To: alleg-developers@xxxxxxxxxx
- Subject: Re: [AD] END_OF_MAIN, again
- From: Chris <chris.kcat@xxxxxxxxxx>
- Date: Sun, 31 Jul 2005 13:21:20 -0700
- Domainkey-signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:from:to:subject:date:user-agent:references:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:message-id; b=LOLdSiy9AZFH1MgfYnC/OtOrAaDZKaB3jtFNONwU2Yifi2/CaFQ740daSiooylEumH+k7Cu4AH5XZLVtGrorVUAwKZE3ffluVE5UExdg5cczyh6BQ+mVghfnnzuxAsPDgCM+sAsOHWPddDr77vSH2p5aKeptm1XlvXRoEQcqUaU=
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++.