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: Mon, 1 Aug 2005 15:12:25 -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=p4CGmuoAnMJBXPNQ7Viz/1NS5DI5Rw+YQolXIYx712MKgx6VQW7B4dR/Dryyxt9DluvEr48iUNuRhjDxj12zbOtIW8Uh8ByaHwf/KBegJ6LJVh1hIqCeyAyqFR3MxrpgU3R7+lOvBkhwgd2Ntt5mrQ3BdD0GR5HhSrH9uEYlqh8=
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.