且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

由于缺少"libgcc_s_dw2-1.dll",OpenCV程序无法运行.在Code :: Block中

更新时间:2023-08-21 19:28:10

最后,我解决了这个问题!

Finally, I fix this problem!

导致此缺少dll"问题的原因是与Code :: Block相连的MinGW编译器不完整.因此,您需要将所需的DLL文件下载到目录"C:\ Program Files(x86)\ CodeBlocks \ MinGW \ libexec \ gcc \ mingw32 \ 4.4.1",还需要将此目录的路径添加到系统PATH环境变量.

This reason that causes this "missing dll" problem is the MinGW compiler attached with the Code::Block is not complete. So, you need to download the required DLL files to the directory "C:\Program Files (x86)\CodeBlocks\MinGW\libexec\gcc\mingw32\4.4.1" which you also need to add the path of this directory to the system PATH environment variable.

在这种情况下,即使只有一个关于libgcc_s_dw2-1.dll的错误消息丢失,我也会下载两个DLL文件:libgcc_s_dw2-1.dll和libstdc ++-6.dll.如果您忘记第二个libstdc ++-6.dll,则在运行该程序时会收到另一条丢失的消息.

In this case, I download two DLL files: libgcc_s_dw2-1.dll and libstdc++-6.dll even if there is only one missing error message about libgcc_s_dw2-1.dll. If you forget the second one, libstdc++-6.dll, you will get another missing message when run the program.

第一个dll libgcc_s_dw2-1.dll可能会引起如下问题:

The first dll, libgcc_s_dw2-1.dll, can be fond at the question Where Can I Get libgcc_s_dw2-1.dll?, in which the download link is listed in the selected answer by the author rodrigo. Thanks the guy!

第二个dll libstdc ++-6.dll可以在

The second dll, libstdc++-6.dll, can be downloaded at http://sourceforge.net/projects/mingw/files/MinGW/Base/gcc/Version4/gcc-4.6.2-1/libstdc%2B%2B-4.6.2-1-mingw32-dll-6.tar.lzma/download