GoogleTest tutorial crashes with shared library on Windows?

I followed the (excellent) tutorial here and got it all to work as promised.

I changed one word in DateConverter_lib\CMakeLists.txt

add_library(DateConverter_lib STATIC

add_library(DateConverter_lib SHARED

The project builds but no longer runs, printing "Test framework quit unexpectedly C000 0135 ...," which, apparently, is a failure to load the DLL (shared library)

Any advice for me?

1 comment


As per, you can try adding `set(gtest_force_shared_crt ON CACHE BOOL "" FORCE)` to your CMakeLists.txt.


Please sign in to leave a comment.