Code::Blocks生成的EXE文件执行错误解决:The program can't start because libgcc_s_dw2-1.dll is missing

简介: 想用C++弄个简单东东,看有没有可行性, 开发软件,微软的太大太肿,就选用了Code::Blocks。 测试HELLO时,在工程环境中没问题的,但生成的EXE执行有问题, 报什么 libgcc_s_dw2-1.dll这个文件有问题。

想用C++弄个简单东东,看有没有可行性,

开发软件,微软的太大太肿,就选用了Code::Blocks。

测试HELLO时,在工程环境中没问题的,但生成的EXE执行有问题,

报什么 libgcc_s_dw2-1.dll这个文件有问题。

网上有什么将这个文件COPY到WIN的系统目录下什么的,设置PATH之类的,不现实。

看了STACKFLOW之后,搞了个简单粗暴的,把这个东东放到EXE里,解决如下:

就是在LINK阶段加选项:-static-libgcc -static-libstdc++

 

目录
相关文章
|
9月前
用IAR打开STM8时,出现“Unable to create configuration 'Debug' using tool chain ‘STM8’
用IAR打开STM8时,出现“Unable to create configuration 'Debug' using tool chain ‘STM8’
225 0
|
编解码 C++ Python
成功解决LINK : fatal error LNK1181: 无法打开输入文件“avdevice.lib” error: command 'D:\\Program Files (x86)\\Micr
成功解决LINK : fatal error LNK1181: 无法打开输入文件“avdevice.lib” error: command 'D:\\Program Files (x86)\\Micr
成功解决LINK : fatal error LNK1181: 无法打开输入文件“avdevice.lib” error: command 'D:\\Program Files (x86)\\Micr
javaioIOException - Cannot run program javac error 2 No such file or direct
javaioIOException - Cannot run program javac error 2 No such file or direct
javaioIOException - Cannot run program javac error 2 No such file or direct
cl.exe is unable to create an executable file
cl.exe is unable to create an executable file
103 0
cl.exe is unable to create an executable file. C compiler test failed.
cl.exe is unable to create an executable file. C compiler test failed.
145 0
|
编解码 并行计算
wrf--运行real.exe时报错:“Could not find level above ground“ error
在修改wrf初始场资料时,如果做了带通滤波处理,会发现在运行real.exe时报错:“Could not find level above ground” error 。
wrf--运行real.exe时报错:“Could not find level above ground“ error
(Anaconda)ImportError: DLL load failed while importing win32file: 找不到指定的模块。
(Anaconda)ImportError: DLL load failed while importing win32file: 找不到指定的模块。
(Anaconda)ImportError: DLL load failed while importing win32file: 找不到指定的模块。
|
开发工具 Windows
“basetsd.h”: No such file or directory,LINK : fatal error LNK1158: 无法运行“rc.exe”报错
无法打开包括文件: “basetsd.h”: No such file or directory 解决方案
“basetsd.h”: No such file or directory,LINK : fatal error LNK1158: 无法运行“rc.exe”报错
|
数据可视化 异构计算
TensorBoard报错:Could not load dynamic library ‘cudart64_110.dll‘; dlerror: cudart64_110.dll not found
TensorBoard报错:Could not load dynamic library ‘cudart64_110.dll‘; dlerror: cudart64_110.dll not found
737 0
TensorBoard报错:Could not load dynamic library ‘cudart64_110.dll‘; dlerror: cudart64_110.dll not found
|
内存技术 芯片
MDK st-link下载STM32程序出现Internal command error和Error:Flash download failed. Target DLL
MDK st-link下载STM32程序出现Internal command error和Error:Flash download failed. Target DLL   是因为目标板的芯片处于休眠的状态,在尝试连接目标板时候也会出现报错Internal command ...
3501 0