Re: [Mingw-w64-public] Mingw-64 and MSVC x64 ABI

2015-06-18 Thread Adrien Nader
Hi, On Thu, Jun 18, 2015, lh_mouse wrote: > 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. As far as I know, GCC is very close to MSVC's C++ ABI currently and only one or two things are d

Re: [Mingw-w64-public] Mingw-64 and MSVC x64 ABI

2015-06-18 Thread Alexandre Pereira Nunes
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 sup

Re: [Mingw-w64-public] Mingw-64 and MSVC x64 ABI

2015-06-17 Thread Etienne Sandré-Chardonnal
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

Re: [Mingw-w64-public] Mingw-64 and MSVC x64 ABI

2015-06-17 Thread Ruben Van Boxem
2015-06-17 18:21 GMT+02:00 lh_mouse : > 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 usef

Re: [Mingw-w64-public] Mingw-64 and MSVC x64 ABI

2015-06-17 Thread lh_mouse
- 发件人:Etienne Sandré-Chardonnal 发送日期:2015-06-17 23:44 收件人:mingw-w64-public 抄送: 主题:[Mingw-w64-public] Mingw-64 and MSVC x64 ABI Dear all, I have a plugin system in my app based on interfaces (classes with only pure virtual functions). The app is compiled with mingw-w64 4.9.2 and works well with

Re: [Mingw-w64-public] Mingw-64 and MSVC x64 ABI

2015-06-17 Thread Alexandre Pereira Nunes
On Wed, Jun 17, 2015 at 1:08 PM, Ruben Van Boxem wrote: > >> > This is most likely an ABI issue yes, because you are relying on the > binary interface of the app and dll to be the same (i.e. the objects are > assumed to have the same memory layout and alignment and padding and > whatnot). Unfortu

Re: [Mingw-w64-public] Mingw-64 and MSVC x64 ABI

2015-06-17 Thread Alexandre Pereira Nunes
Yes, you can say it's an ABI issue. There are generally no C++ ABI provisions for inter-compiler (complex) object passing. You have only moderate access to influence name mangling (via extern "C" { } constructs) and calling convention (stdcall and friends), but inheritance has other requirements (V

Re: [Mingw-w64-public] Mingw-64 and MSVC x64 ABI

2015-06-17 Thread Ruben Van Boxem
2015-06-17 17:44 GMT+02:00 Etienne Sandré-Chardonnal : > Dear all, > > I have a plugin system in my app based on interfaces (classes with only > pure virtual functions). The app is compiled with mingw-w64 4.9.2 and works > well with plugin dlls compiled with the same compiler. > > Now I am trying

[Mingw-w64-public] Mingw-64 and MSVC x64 ABI

2015-06-17 Thread Etienne Sandré-Chardonnal
Dear all, I have a plugin system in my app based on interfaces (classes with only pure virtual functions). The app is compiled with mingw-w64 4.9.2 and works well with plugin dlls compiled with the same compiler. Now I am trying to support MSVC compiled plugins. This works partially : the app ca