If GCC is able to interoperate with simple vtables in 32-bits, as you say,
then perhaps it's only a matter of setting some options. gcc manual (IIRC)
says that you need -maccumulate-outgoing-args -mabi=ms on x86_64 for
microsoft abi compatibility (while -mabi=ms suffices in 32-bit). -mabi=ms
is supposed to be gcc's default when targeting windows, but at lest on my
build gcc -Q --help=target | grep mabi diverts.


On Wed, Jun 17, 2015 at 6:25 PM, Etienne Sandré-Chardonnal <
[email protected]> wrote:

> Thanks for all responses.
>
> Compiler ABI's are incompatible in general, but there was a nice exception
> in the windows world with interfaces (ie classes with only pure virtual
> functions) which were indeed working under most windows compilers, as the
> COM/RPC had somewhat established a standard.
>
> With 32-bit MinGW and MSVC, this was at least working, as both were
> implementing the class as a plain linear vtable, and as it was possible to
> specify the calling convention.
>
> It seems that with 64-bit we still have compatible vtables, but the
> calling convention seem to be different, and there is no way to change it
> in either compiler. That's sad : with 32bits, there were pseudo-standards
> such as fastcall, stdcall and cdecl. 64bit seems a dark age for calling
> conventions :(
>
> Etienne
>
>
>
>
> 2015-06-17 18:38 GMT+02:00 Ruben Van Boxem <[email protected]>:
>
>> 2015-06-17 18:21 GMT+02:00 lh_mouse <[email protected]>:
>>
>>> g++ and clang++ use Itanium ABI while MSVC uses some M$ specific,
>>> unpublished ABI. Hence it is not surprising that they are incompatible with
>>> each other.
>>>
>>>
>> Clang actually aspires to use MSVC's ABI on Windows, and they're close,
>> if not already in a useful state right now.
>>
>> Ruben
>>
>>
>> ------------------------------------------------------------------------------
>>
>> _______________________________________________
>> Mingw-w64-public mailing list
>> [email protected]
>> https://lists.sourceforge.net/lists/listinfo/mingw-w64-public
>>
>>
>
>
> ------------------------------------------------------------------------------
>
> _______________________________________________
> Mingw-w64-public mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/mingw-w64-public
>
>
------------------------------------------------------------------------------
_______________________________________________
Mingw-w64-public mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mingw-w64-public

Reply via email to