Skip to content

Commit a63ab65

Browse files
fix: set CMAKE_RUNTIME_OUTPUT_DIRECTORY to fix DLL not found (0xc0000135) on Windows (#10)
Test executables failed at runtime because the extension DLL was built in a sibling directory and Windows could not locate it. Centralising all runtime outputs (DLLs and EXEs) to build/bin ensures the loader finds them.
1 parent 5414230 commit a63ab65

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

CMakeLists.txt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,10 @@ set(CMAKE_CXX_STANDARD_REQUIRED ON)
99
# so MSVC produces the .lib needed by test executables.
1010
set(CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS ON)
1111

12+
# On Windows, DLLs and test executables must be in the same directory so the
13+
# runtime loader can find them. Centralise all runtime outputs.
14+
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin)
15+
1216
find_package(GTest REQUIRED)
1317
include(GoogleTest)
1418
include(CTest)

0 commit comments

Comments
 (0)