无法 运行 执行,因为缺少 libgcc_s_dw2-1.dll

Can't run executable as libgcc_s_dw2-1.dll is missing

当我 运行 我的程序在 Code::Blocks 中时,它工作正常。但是当我构建它然后单击可执行文件时,我收到一条错误消息

The program can't start because libgcc_s_dw2-1.dll is missing from your computer. Try reinstalling the program to fix this problem.

我不确定为什么会发生这种情况我做了我看过的所有 tuts 安装 Code::blocks 所做的一切。

您应该将 libgcc_s_dw2-1.dll(它应该位于类似于 C:\MinGW\binC:\Program Files\CodeBlocks\MinGW\bin 的某个位置)复制到与 .exe.

相同的文件夹中