The library `mylib` consists of the library proper, in directory `lib/`, and a test suite, in directory `test/`. It is completely under CMake control:
mylib/CMakeLists.txt: ... add_subdirectory(lib) add_subdirectory(test) ... mylib/lib/CMakeLists.txt: ... add_library(my_lib ${src_files}) ... mylib/test/CMakeLists.txt: ... add_executable(mytest mytest.c) target_link_libraries(mytest mylib) Build steps are: mkdir build cd build cmake .. make ctest # or make test make install Works under Linux, stable since many years. Under Windows10 though, a message window pops up, entitled "mytest.exe - System error": "The code execution cannot proceed because mylib.dll was not found. Reinstalling the program may fix this problem." No, installing (rather than reinstalling) would not be a good solution: I need to first test the library before I install it (btw: this excludes most solutions proposed in response to somewhat similar questions). Isn't CMake supposed to work cross-platform? What is the minimally invasive adjustment to make the above build steps work under Windows? Disclosure: this is a cross-posting from https://stackoverflow.com/questions/54560434. Thanks for any help - Joachim
smime.p7s
Description: S/MIME Cryptographic Signature
-- Powered by www.kitware.com Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Kitware offers various services to support the CMake community. For more information on each offering, please visit: CMake Support: http://cmake.org/cmake/help/support.html CMake Consulting: http://cmake.org/cmake/help/consulting.html CMake Training Courses: http://cmake.org/cmake/help/training.html Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Follow this link to subscribe/unsubscribe: https://cmake.org/mailman/listinfo/cmake-developers