我已经安装了cygwin。但是当我尝试编译 C++ 文件时,出现以下错误:
/usr/lib/gcc/i686-pc-cygwin/4.3.4/cc1plus.exe: error while loading shared libraries: cygmpfr-1.dll: cannot open shared object file: No such file or directory
我检查了 lib 文件夹,没有名为 cygmpfr-1.dll
的库。所以我必须把那个dll放在lib文件夹中吗?我尝试搜索该 dll,但找不到该 dll,因此无法下载。我只是 C++ 的初学者。我也尝试在 netbeans 中设置 cygwin 支持,但是如果我尝试运行给定的示例文件,它也会抛出上述错误。
有人可以给我线索吗?
最佳答案
您需要通过http://cygwin.com/setup.exe安装gcc4-g++软件包 您只安装了 gcc4。
这还将安装您缺少的依赖项。
关于c++ - 如何在 Windows 7 上使用 cygwin 编译 C++ 文件,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/4466503/