0
votes

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/

Configuration failed with error (sh -c "autoreconf -i" Cannot run program "sh": Launching failed

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;] )

How can I prevent this error from occurring?

1
The problem is your compiler setup.drescherjm
I am a beginner and trying to begin learning You picked one of the more difficult compiler setups to install.drescherjm
for this code Eclipse is an an overkill. Anyway assuming that you installed Cygwin you need to add the cygwin\bin directory to your PATH.matzeri
I went to Project>properties>C/C++ general>GNU C++>Add>Fuile system> and clicked the C:\cygwin\bin folder. Still getting the same error message. Any idea?Mads41

1 Answers

0
votes

Make sure you had choiced the right "Perspective".

You need to select C++, after that hit "Build Project".

enter image description here

Also make sure you had choice toolchain that you had install in your computer. In you case need to point out cygwin: enter image description here