Bug on C/C++ library to D, parameters suddenly becomming null or invalid

Mike Parker aldacron at gmail.com
Mon Oct 19 22:39:59 UTC 2020


On Monday, 19 October 2020 at 17:49:24 UTC, Hipreme wrote:
> when the C++ file gets compiled on MSVC it turns into a non-POD 
> struct, while on MinGW and GCC it turns into a POD, so it was 
> quite strange,

As a general rule, you shouldn't mix binaries from MinGW and 
MSVC. Inconsistencies like this are bound to arise. DMD is 
implemeted to match MSVC. It's fine when loading C dlls 
dynamically, but as soon as you bring a linker or the C++ API 
into the picture, you'll hit issues eventually.


More information about the Digitalmars-d mailing list