SIGSEGV when using D DLL with Qt MinGW

Mike Parker via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Tue Feb 23 03:10:30 PST 2016


On Tuesday, 23 February 2016 at 08:50:45 UTC, Jerry wrote:
>
> I am using the following environment:
>
> Windows 7
> Qt 5.5
> MinGW 4.9
> DMD 2.69.1
> DUB (with dynamicLibrary option)
>
> Everything is x86.
>
> I am really stuck here. Thanks on beforehand.

I'm surprised you're able to get an executable when linking with 
the import library. By default, DMD uses the OPTLINK linker for 
32-bit output, which creates object files in OMF format. MinGW 
uses COFF. If you want 32-bit COFF output from DMD, you'll need 
to make sure you have the Microsoft compiler tools installed 
(Visual Studio Community Edition is an easy way to get everything 
you need) and use the -m32mscoff command line switch with DMD 
when compiling your DLL. However, there are often 
incompatibilities between MinGW's COFF and Microsoft's COFF, so 
you may still get no joy.




More information about the Digitalmars-d-learn mailing list