Setting /MT flag when compiling C & C++ drivers for Windows

How are you setting the MSVC_RUNTIME_LIBRARY?
You should be setting CMAKE_MSVC_RUNTIME_LIBRARY=MultiThreaded (/MT) during CMake configuration. Editing the CMake config directly isn’t required.

$ cmake -S . -B build -D CMAKE_MSVC_RUNTIME_LIBRARY=MultiThreaded -D BUILD_SHARED_LIBS=OFF