简体   繁体   English

该程序无法启动,因为您的计算机缺少libgcc_s_dw2-1.dll。 简单的控制台

[英]The program can't start because libgcc_s_dw2-1.dll is missing from your computer. Simple console

Please help. 请帮忙。 I am using Code Blocks, and I have just built a project and now when I try to run the ".exe" it says this message "The program can't start because libgcc_s_dw2-1.dll is missing from your computer...this problem." 我正在使用代码块,并且我刚刚构建了一个项目,现在当我尝试运行“ .exe”时,它显示以下消息:“该程序无法启动,因为您的计算机缺少libgcc_s_dw2-1.dll ...这个问题。” I have tried to download those .dlls and extract them into the location where the ".exe" is stored and then tried running the program again but it crashes. 我尝试下载这些.dll,并将它们解压缩到存储“ .exe”的位置,然后尝试再次运行该程序,但它崩溃了。 I have no idea what to do anymore. 我不知道该怎么办了。 Can anyone give me steps to solving this using Code Blocks(IDE. that I use)? 谁能给我一些使用代码块(我使用的IDE)解决此问题的步骤吗? Please. 请。

Another note that I'd like to add is that I am learning C++ and I do not understand complicated lingo like "linker", "links", and etcetera. 我想补充的一点是,我正在学习C ++,并且我不理解诸如“链接器”,“链接”等之类的复杂术语。 I want this application to be stand-alone if possible but I have searched around about this issue and people are saying to place the related .dlls from the bin of minGW where your executable is but then they say that there is licensing issues. 我希望该应用程序尽可能独立运行,但是我已经搜索了这个问题,人们说要从minGW的可执行文件所在的位置放入相关的.dll,但随后他们说存在许可问题。 I am getting confused about this and I just want a simple fix, I don't want any licensing issues. 我对此感到困惑,我只想要一个简单的修复程序,不需要任何许可问题。 Can you explain it from Code Blocks point of view? 您能从代码块的角度解释它吗? Because that's the program that I am using, and some steps to fix it would be really nice. 因为那是我正在使用的程序,所以修复它的一些步骤真的很不错。 Note 3: People are also saying to use something like "-static-libgcc" but I have no idea what to do with that. 注意3:人们也说要使用“ -static-libgcc”之类的东西,但是我不知道该怎么做。

The libgcc_s_dw2-1.dll should be in the compiler's bin directory. libgcc_s_dw2-1.dll应该在编译器的bin目录中。

You can add this directory to your PATH environment variable for runtime linking, or you can avoid the problem by adding -static-libgcc -static-libstdc++ to your compiler flags. 您可以将此目录添加到PATH environment variable以进行运行时链接,也可以通过在编译器标志中添加-static-libgcc -static-libstdc++来避免此问题。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM