qtkeychain icon indicating copy to clipboard operation
qtkeychain copied to clipboard

`STATUS_DLL_NOT_FOUND` if library added from a subdirectory, built with MinGW and CMake

Open waleko opened this issue 2 years ago • 0 comments

I am trying to add QtKeychain to my project.

I want to use the library from a git submodule. I am using Cmake 3.23.2, MinGW 8.1.0 and Qt 5.15.2. I'm adding qtkeychain it as a subdirectory, Interestingly the build does succeed (so the dll is being successfully built). However, if I try to run the resulting executable I get the following:

Process finished with exit code -1073741515 (0xC0000135)

0xC0000135 exit code turns out to mean STATUS_DLL_NOT_FOUND. Therefore some linking issues are present? I have tried running it with both Ninja and MinGW Makefiles only to get the same result.

I have put together a demo repository that illustrates what I want to achieve and how I fail. I also connected AppVeyor CI to show the reproducibility. This behavior corresponds to that on my local machine.

However, if I try the same on Linux, everything works just fine which is bizarre. See the following github action.

Am I doing something wrong? If yes, how should I achieve what I have in mind?

Full logs available on AppVeyor.

waleko avatar Jun 08 '22 17:06 waleko