Eclipse和cygwin-错误:在PATH中找不到程序“ sh”

时间:2018-08-17 00:47:12

标签: c++ eclipse compiler-errors cygwin

我正在运行以下代码:

#include <iostream> 
using namespace std;
int main() {
    cout << "!!!Hello World!!!" << endl; // prints !!!Hello World!!!
    return
}

我收到以下错误消息:

  

在构建目录中调用autoreconf:C:/ Users / madle / eclipse-workspace / hjbhjbjh /

     

配置失败,并显示错误   (sh -c“ autoreconf -i”   无法运行程序“ sh”:启动失败

     

错误:在PATH中找不到程序“ sh”   PATH = [C:/ Program Files / Java / jre1.8.0_181 / bin / server; C:/ Program Files / Java / jre1.8.0_181 / bin; C:/ Program Files / Java / jre1.8.0_181 / lib / amd64; C:\ Program Files(x86)\ Common Files \ Oracle \ Java \ javapath; C:\ Program Files(x86)\ Intel \ iCLS Client \; C:\ Program Files \ Intel \ iCLS Client \; C:\ Windows \ system32; C:\ Windows; C:\ Windows \ System32 \ Wbem; C:\ Windows \ System32 \ WindowsPowerShell \ v1.0 \; C:\ Program Files(x86)\ Intel \ Intel(R)Management Engine Components \ DAL; C:\ Program Files \ Intel \ Intel(R)管理引擎组件\ DAL; C:\ Program Files(x86)\ Intel \ Intel(R)Management Engine组件\ IPT; C:\ Program Files \ Intel \英特尔(R)管理引擎组件\ IPT; C:\ Program Files(x86)\ NVIDIA Corporation \ PhysX \ Common; C:\ Program Files \ Intel \ WiFi \ bin \; C:\ Program Files \ Common Files \ Intel \ WirelessCommon \; C:\ Users \ madle \ AppData \ Local \ Microsoft \ WindowsApps ;; C:\ eclipse;]   )

如何防止发生此错误?

1 个答案:

答案 0 :(得分:0)

确保您选择了正确的“透视”。

在点击“ Build Project”之后,您需要选择C ++。

enter image description here

还请确保您已选择在计算机上安装的工具链。在你的情况下需要指出cygwin: enter image description here