<div dir="ltr">On Windows, a .dll is considered by CMake to be a "RUNTIME" Output artifact if it was added with the `add_library(my_liib SHARED my_lib.cpp), however if it was added with the MODULE keyword, it is considered to be a "LIBRARY" output, as stated in the documentation <a href="https://cmake.org/cmake/help/latest/manual/cmake-buildsystem.7.html#runtime-output-artifacts" target="_blank">https://cmake.org/cmake/help/latest/manual/cmake-buildsystem.7.html#runtime-output-artifacts</a><div><br><div>I just discovered this behavior and it seems quite unintuitive to me.</div></div><div>If I dynamically load a library with LoadLibrary without specying an absolute path, Windows will still use the default search path logic for Windows, which means first same directory as the executable loading the module, e.g. the RUNTIME output directory.<br></div><div>(See also <a href="https://docs.microsoft.com/en-us/windows/desktop/api/libloaderapi/nf-libloaderapi-loadlibrarya" target="_blank">https://docs.microsoft.com/en-us/windows/desktop/api/libloaderapi/nf-libloaderapi-loadlibrarya</a>)</div><div><br></div><div>Can you please elaborate on this?   <br></div><div><br></div><div>Thanks, Kerstin</div></div>