Cannot run program "sh" eclipse C++ project in windows 7 - c++

I'm on Eclipse Luna for C/C++ developers. Compiling a Hello World project works just fine. But now I'm working with a project I downloaded via SVN and can't get it to build correctly.
The problem shows "CreateProcess error = 2 the system cannot find the specified file" Type: Configure Problem.
From what I've looked up this is caused by having configured an Autotools project, but in C/C++ build -> Tool Chain Editor -> Current Toolchain I have set up MinGW GCC instead of GNU Autotools toolchain. Any ideas on what could be causing this problem or how to fix it?

Related

eclipse oxygen - Launch error: Binary not found

Whenever I create a new project it doesn't include the binaries thing and I get this error: "Launch Failed: Binary not found"
I have already tried changing run configurations to no avail. I have the debug folder but in it is a mysterious stringTest.o file which cannot run the project.
I have built the project several times.
I am using the latest version of Eclipse Oxygen and the MinGW compiler (GNU for Windows).
I have searched for half an hour around and all the methods I've tried haven't worked. Any help is much appreciated.
Thanks!
To Compile and Build the project in Eclipse do
Project -> Build Project
Then to run the project right click on your source code file and select
Run As -> Local C/C++ Application

CreateProcess error=2, The system cannot find the file specified) [duplicate]

I am using Eclipse for Windows and have this error:
Build of configuration Debug for project helloworld
(Cannot run program "make": Launching failed)
What do I do to solve this?
Eclipse CDT on Windows depends on 3rd party tools.
You may find this useful: Setting up a compiler
I faced the same problem while installing Eclipse for c/c++ applications .I downloaded Mingw GCC ,put its bin folder in your path ,used it in toolchains while making new C++ project in Eclipse and build which solved my problem. Referred to this video

Recipe for target failed error in Eclipse using cygwin

First of all, I know that this question already exists multiple times in Stackoverflow but the answers provided for all of them didn't solve my issue(See section "Solutions worked for others" at the end of this question).
I am using the Eclipse IDE(Juno) with CDT plugin and Cygwin installed in my Windows-7 64-bit platform.
I successfully compiled and run the Hello World 'C' program but the Hello World "C++ program" is having Launch failed. Binary not found error.
I am also having recipe for target project.exe failed error in my auto-generated makefile.
Error line in makefile: #echo 'Building target: $#'
Additionally:
In c/c++ build -> toolchain editor ->
Current toolchain : Cygwin GCC
Current Builder : Gnu Make Builder
Used Tools:
GCC Assembler,
GCC Archiver,
Cygwin C++ Compiler,
Cygwin C Compiler,
Cygwin C Linker,
Cygwin C++ Linker.
When I change Current Builder from "Gnu Make Builder" to "CDT Internal Builder" the recipe for target project.exe failed error disappears but the Launch failed. Binary not found error still exists.
And also I dont have MinGW installed.
Solutions worked for others :
Before running the project directly using the run command, first Build the project and then run.
I build the project every time before I run it.
Eclipse can't find or point to an .exe file but the exe file runs fine when run from windows explorer and the answer to it is add -arch i386 to miscellaneous under linker.
My build runs without error but not creating the exe file. So this doesnt apply to me
Project->Properties->C/C++ Build->Settings->Binary Parsers
set "Cygwin PE Parser" and/or " PE Window Parser" and alike.
Tried all of them with different combinations but did not work
I also did :
adding the cygwin install dir to the path variable
added all the includes folders needed for cygwin for both GNU C and GNU C++ in Paths-and-Symbols -> includes
Saved the project before building and then running
restarted eclipse again
checked if g++ is installed using which g++ in terminal
and so on.
What could be a fix to this problem? Or do I have to install MinGW (I tried already to install MinGW with the installer.exe they provided and it failed on downloading the files several times) and try again.
I couldn't find the solution. Please show me what am I missing here.
Thanks in advance.

How to install C++ plugin to Eclipse?

I have Eclipse Helios and wanted to code C++ using it, but I keep running into the "Launch failed. Binary Not found" error.
I installed the MingW C++ compiler using the "mingw-get-inst-20120426" file and selected the "C compiler, C++ compiler, MSYS Basic System, and MingW Developer Toolkit".
Then I went to Eclipse > project > properties > C/C++ General > Paths and Symbols, then selected the GNU C++ in the Includes tab and added the "C:\MinGW\lib\gcc\mingw32\4.6.2\include\c++" path.
I also went to C/C++ build > Environment and appended the "C:\MinGW\bin;C:\MinGW\msys\1.0\bin" to the PATH.
Then I created a Hello World C++ project, selecting the MingW GCC under Toolchains, and then built the project using the "hammer" icon.
However, once I ran the HelloWorld program it gets the "Launch failed. Binary Not Found" error.
Here is another error:
g++ -IC:\MinGW\lib\gcc\mingw32\4.6.2\include\c++ -O0 -g3 -Wall -c -
fmessage-length=0 -osrc\HelloWorld.o ..\src\HelloWorld.cpp
Internal Builder: Cannot run program "g++": The system cannot find the
file specified.
I also downloaded the CDT (C/C++ Development Tooling) and transferred the "features" and "plugins" folder to the eclipse folder.
Can someone please give me step-by-step on how to resolve this?
Firstly, in the following examples all drive-letters should be replaced with the relevant ones on your system. Not all of these steps are really necessary, but it works (and the more the merrier).
We start with the slightly simpler release config - we want to make it compile.
Go to Project -- Properties
Look if the include directories are correct and in place.
Go to Project -- Properties -- Run/Debug Settings -- NEW -- Main Tab
Set to Release and Browse to the Release folder of the project. If the exe file is not set type in its name.
Switch to Common Tab. Check Allocate Console and Launch in Background. Don't Run yet.
Go to Project -- Properties -- C/C++ Build -- Discovery Options
Tools -- GCC C++ Compiler
"Browse" to the mingw bin folder and select the g++.exe or copy mingw32-g++.exe to g++.exe
Note: The image points to mingw32-g++.exe please use g++.exe
Right click on the project and look -- Build Configurations -- Set Active -- Release is checked.
Right click on the project -- Run As -- Run Configurations.
Under C/C++ Application select, the one which refers to the release version. Then click Run
If this works, I will show you how to set the Debug Properties. (more complicated)
Nowadays (Eclipse Juno and newer), it is much simpler. You just need to:
Install MinGW (and including C++ compiler)
Add the paths "C:\minGW\bin" and "C:\minGW\msys\1.0\bin" (or wherever you installed MinGW to) to your Windows "Path" variable
Install Eclipse. If Eclise already is installed, restart it. it will recognize that MinGW is now available.
Create a New project: "C++ Project"
For every Project type in the following dialog, you should now be able to select the "MinGW GCC" toolchain
Happy coding
See here: http://www.youtube.com/watch?v=QhvXCg2CY4Q
g++ is installed as part of MinGW. If you are getting an error in Eclipse that it cannot find g++ then your path is most likely incorrect. From a command prompt you should be able to run:
g++ --version
and it should display the version of g++ in the MinGW/bin directory.
Eclipse uses this path to locate the include files and the compiler. Once you get the path correct restart Eclipse and the problems listed in your question should be resolved.

Eclipse Linux stock "Hello World"-app doesn't run

I've been developing with C++ in VS2010 but now I am trying to convert
my apps to build and run under Linux. So I've installed Eclipse Indigo
and the CDT package on an Ubuntu linux machine.
When I create the stock "Hello World"-project for C++, I get the
classic "Binary not found" error message. I've combed the internet,
but found no solution.
Through my findings I have gone to:
Project -> Properties -> C/C++ Build -> Tool Chain Editor
and changed the Current Toolchain from Linux GCC to MinGW GCC.
But after rebuilding the project I still have the same error message.
Any suggestions?
The gcc package doesn't necessarily include the C++ compiler. Try:
whereis g++
on the commandline (or g++ -v) to check if it is installed...