Skip to content

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

@waleko

Description

@waleko

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions