简体   繁体   English

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

[英]Eclipse and cygwin - Error: Program “sh” not found in PATH

I am running the following code: 我正在运行以下代码:

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

I get the following error message: 我收到以下错误消息:

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

Configuration failed with error (sh -c "autoreconf -i" Cannot run program "sh": Launching failed 配置失败,并显示错误(sh -c“ autoreconf -i”无法运行程序“ sh”:启动失败

Error: Program "sh" not found in PATH 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) Management Engine Components\\DAL;C:\\Program Files (x86)\\Intel\\Intel(R) Management Engine Components\\IPT;C:\\Program Files\\Intel\\Intel(R) Management Engine Components\\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;] ) 错误:在路径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客户端\\; C:\\ Windows \\ system32; C:\\ Windows; C:\\ Windows \\ System32 \\ Wbem; C:\\ Windows \\ System32 \\ WindowsPowerShell \\ v1.0 \\; C:\\ Program Files(x86) \\ Intel \\ Intel(R)管理引擎组件\\ DAL; C:\\ Program Files \\ Intel \\ Intel(R)管理引擎组件\\ DAL; C:\\ Program Files(x86)\\ Intel \\ Intel(R)管理引擎组件\\ IPT; C:\\ Program Files \\ Intel \\ 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;]

How can I prevent this error from occurring? 如何防止发生此错误?

Make sure you had choiced the right "Perspective". 确保您选择了正确的“透视”。

You need to select C++, after that hit "Build Project". 您需要选择C ++,然后单击“ Build Project”。

在此处输入图片说明

Also make sure you had choice toolchain that you had install in your computer. 还要确保您已经选择了安装在计算机中的工具链。 In you case need to point out cygwin: 在你的情况下需要指出cygwin: 在此处输入图片说明

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

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