微信公众号搜"智元新知"关注
微信扫一扫可直接关注哦!

netbeans8.2 + msys2_64 + mingw64 + cygwin64 + C 项目构建错误

如何解决netbeans8.2 + msys2_64 + mingw64 + cygwin64 + C 项目构建错误

在配备 Xeon E2224G 处理器的全新 HP 塔式 G4 工作站上,Windows 10 专业版适用于 wokstations 操作系统 build 19042.746。

安装 netbeans 8.2

安装 msys2_64 和 mingw64

设置路径e:\msys64\usr\bin; e:\msys64\mingw64\bin; %路径%

验证 make、sh、bash、rm 等是否在 e:\msys64\usr\bin 中 为 C 项目配置 netbeans 并尝试清理和构建并收到此错误

'No shell found. Cannot proceed. Please install either CYGWIN or Msys.'

好的,安装cygwin。 现在得到这个错误

'1 [main] rm (7980) E:\cygwin64\bin\rm.exe: *** Fatal error - cygheap base mismatch detected - 0x180345408/0x180347408.'
This problem is probably due to using incompatible versions of the cygwin DLL.
Search for cygwin1.dll using the Windows Start->Find/Search facility
and delete all but the most recent version.  The most recent version *should*
reside in x:\cygwin\bin,where 'x' is the drive on which you have
installed the cygwin distribution.  Rebooting is also suggested if you
are unable to find another cygwin DLL.
cygcheck -c gives
base-cygwin          3.8-1              OK
base-files           4.3-2              OK
cygwin               3.1.7-1            OK

搜索过,只有一个 cygwin1.dll

frank@FRANK_NEW ~
$ which cygwin1.dll
/usr/bin/cygwin1.dll

我已经多次重启机器都无济于事。

我使用 netbeans 和 mingw 然后是 msys/mingw 大约 10 年了, 有组合在其他台式机和笔记本电脑上工作,但有 没有这个问题。

解决方法

感谢楼上的回复。这里的问题是 Windows 10 Pro 和 Windows 10 Pro for Workstations 处理 PATH 的方式不同。

Win10 专业版 定义一个用户变量 'MSYS_HOME' 给它一个值 'E:\msys64\usr\bin' 现在把它放在系统路径中,即 一些系统路径;%MSYS_HOME%;更多系统路径 Netbeans会找到rm、sh、make等工具,完成项目的clean和build。

适用于 Win10 Pro for Workations 以上没有奏效。 Netbeans 不会构建项目并给出错误 '没有发现贝壳。无法继续。请安装 CYGWIN 或 Msys。 路径必须直接在系统路径中设置,即 一些系统路径;E:\msys64\usr\bin;更多系统路径 这使得 Netbeans 可以正常工作以执行清理和构建。

版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。