Trying to create a spec file for a WINE wrapper for a Windows 64-bit DLL.
In a 32-bit equivalent project the spec file might have contained something like this:
@ stdcall foo (long ptr) Proxyfoo
In the above example, the functype
is stdcall
and the WineLib User Guide suggests that all possible values of functype
are as follows:-
FUNCTYPE should be one of:
So what value should be used for a 64-bit function? Or can it just be omitted? The user guide does not suggest it is an optional item.
In x86-64, stdcall
, cdecl
, and thiscall
are all the same calling convention. varargs
is the same calling convention too, but Winelib needs to know that the function can have an arbitrary number of arguments.
I would use cdecl
in your specfile because it is the default calling convention on all modern C compilers. That way, if at some point you decide to compile the DLL as 32-bit, the specfile will likely work without any changes.