tinycc-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Tinycc-devel] stdcall DLL calling convention


From: livespi
Subject: Re: [Tinycc-devel] stdcall DLL calling convention
Date: Sun, 9 Feb 2014 10:53:39 -0800

Thx for the reply.

So, to answer my own question, I'd change-->
DLL_EXPORT BOOL func(HANDLE h, UCHAR c) {
<--
-- to -->
__stdcall BOOL func(HANDLE h, UCHAR c) {
<--
And if I compile w/ -shared compiler option, a dll will be created and the
functions will behave with stdcall calling convention. Is that correct?

[BTW, I'm using tcc version 0.9.25. Does it work with this version?]
                        *** WinXP using Popcorn email client



----- Original Message ---------------

Subject: Re: [Tinycc-devel] stdcall DLL calling convention
   From: grischka <address@hidden>
   Date: Sun, 09 Feb 2014 19:32:47 +0100
     To: address@hidden

livespi wrote:
> I'm trying to make a DLL for Windows w/ TinyCC (using -shared compiler
> option) and I'd like the functions to use stdcall convention instead of
> the default cdecl.
> The tcc-doc says I can do this w/ __attribute__, but doesn't elaborate.
> So if I have --->
> #define DLL_EXPORT __declspec(dllexport)
> DLL_EXPORT BOOL func(HANDLE h, UCHAR c) {
>   ...
> }
> <--
> Can someone show me how to define this to use stdcall?

See win32/examples/dll.c for an example and win32/include/_mingw.h for
more background info how __declspec works.

--- grischka


_______________________________________________
Tinycc-devel mailing list
address@hidden
https://lists.nongnu.org/mailman/listinfo/tinycc-devel




reply via email to

[Prev in Thread] Current Thread [Next in Thread]