[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: RE: Standard calling convention on Windows?
- From: "King, Mike" <MKing@...>
- Date: Mon, 27 Jul 2009 12:44:07 -0400
Both DLLs from LuaBinaries and Lua with Batteries export functions without the underscore prefix. When I build the DLL using C++Builder 2009, all of the exported functions have the underscore prefix. What am I missing?
-----Original Message-----
From: lua-bounces@bazar2.conectiva.com.br [mailto:lua-bounces@bazar2.conectiva.com.br] On Behalf Of Peter Cawley
Sent: Monday, July 27, 2009 12:32 PM
To: Lua list
Subject: Re: Standard calling convention on Windows?
I'm not aware of any formal standard, though the de-facto standard is
probably __cdecl. Given that some of the API functions have to be
__cdecl due to variable argument lists, it makes sense to export all
of them as __cdecl. Though as a counter-example, all of the (recent)
games by Relic Entertainment use Lua via a DLL and export everything
as __stdcall (apart from the aforementioned vararg functions).
On Mon, Jul 27, 2009 at 5:11 PM, steve donovan<steve.j.donovan@gmail.com> wrote:
> On Mon, Jul 27, 2009 at 5:37 PM, King, Mike<MKing@klmicrowave.com> wrote:
>> Is there a standard calling convention for building the Lua DLL on Windows?
>> The Lua DLLs I've seen from a couple of projects are not using the __cdecl
>> convention. Is the standard __stdcall? Is there a standard?
>
> They are exported as just plain cdecl C functions.
>
> steve d.
>
CONFIDENTIALITY NOTICE: This e-mail message, including any attachments, is for the sole use of the intended recipient(s) and may contain information that is confidential or proprietary to K&L Microwave, Inc. Any unauthorized review, use, disclosure or distribution is prohibited. If you are not the intended recipient, immediately contact the sender by reply e-mail and destroy all copies of the original message.