Why does a DLL compiled in MinGW crash?

338 Views Asked by At

I have compiled one DLL in Cygwin using g++ 4.7. It works fine. But when I compile same code in MinGW and try to use a DLL. It crashes the program with access denied (CX00000005) error and shows libstdc++-6.dll as problem DLL.

Any help is appreciated. Thanks in advance.

1

There are 1 best solutions below

3
On

You are most likely missing a MinGW dll or have a cygwin dll in PATH when you run your application. Be sure to copy the correct dll's to the same directory as your exe.