Re: SIGSEGV when using D DLL with Qt MinGW

2016-02-23 Thread Jerry via Digitalmars-d-learn
On Tuesday, 23 February 2016 at 11:10:30 UTC, Mike Parker wrote: I'm surprised you're able to get an executable when linking with the import library. I actually just tried a bunch of extern(?), extern "?" combinations and it compiled. If you want 32-bit COFF output from DMD, you'll need to

Re: SIGSEGV when using D DLL with Qt MinGW

2016-02-23 Thread Mike Parker via Digitalmars-d-learn
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 linkin

SIGSEGV when using D DLL with Qt MinGW

2016-02-23 Thread Jerry via Digitalmars-d-learn
Hello guys, as the title says I'm getting a SIGSEGV when trying to use a D DLL. Let's take a look on this C++ code: extern "C" __declspec(dllimport) void D_user_fillEngine(const char* workDir, void* engine); extern "C" __declspec(dllimport) int D_user_startUp(); extern "C" __declspec(dllimpo