Problem with compiled OF project using msys2 on Windows

I have this strange issue when I managed to set up OF on both Linux and Windows through QtCreator 4.6.1 as recommended by the setup guide (though it gives warnings/errors for the OFcompiled, everything seems to work…) - it can be built and run on Qt, but not separately as double-clicking the .exe file. It complains about zlib1.dll.
To be more precise, the error msg is:

3DPrimitivesExample.exe - Entry Point Not Found

The procedure entry point inflateValidate could not be loaded in the
dynamic link library zlib1.dll.

Tried to build an example and run it via make run in msys2 MingW32 console, and it opens up correctly as though it opened the executable file.
Thought it would be an issue of bad build from the Qt, but still, even if built via mingw32 console, it doesn’t run stand-alone as it should as an .exe file.

My suspicion is that the windows system requires minGW32/cygwin library the same way as if an OF project was build in VS, it would require visual c++ redistributable.
Am I right in this case?
Would installing from an official MingW setup help so that the system might recognize it? It is not enough to have msys64 installed in C:/ after all?

Hmm… already found a solution - just copied these 2 DLLs from the msys64/mingw32/bin/ directory


straight into the folder with the compiled executable file. Now it works as it should…
Anyway, I think this should be made by default when building with mingw32, if possible.

Hello mr.Bitmap,

There is a special command to copy all the needed dlls.
run make copy_dlls.
It’s not done by default because it becomes painful when you switch from debug to release.


Aaah, ok, thanks… Already thought there must be some way to do this…