vscode编译的window程序默认拷贝到非开发者电脑会缺少vc运行库需要配置为Mtd模式这样其它电脑才能正常
vscode+cmakelist模式编译时只需要在cmakelist.txt文件中加入下述语句即可
set(CMAKE_MSVC_RUNTIME_LIBRARY "MultiThreaded$<$<CONFIG:Debug>:Debug>")
CMakeList.txt示例
cmake_minimum_required(VERSION 3.15.0)
project(RtspLiverServer VERSION 1.4.4)
# cmake 3.15.0
set(CMAKE_MSVC_RUNTIME_LIBRARY "MultiThreaded$<$<CONFIG:Debug>:Debug>")