The program cannot start because libgcc_s_dw2-1.dll is missing from
your computer. Try reinstalling the program to fix this problem
原因:使用CLion編譯的程序是用cmake方法編譯的,在windows上exe文件需要libgcc才能運行
解決方法
修改CMAKElist文件,添加讓鏈接器靜態鏈接libgcc和libstdc++的指令
set(CMAKE_EXE_LINKER_FLAGS "-static-libgcc -static-libstdc++")
程序便可以執行