Eclipse compiling error for C++ - c++

I just switched from mac to pc and I have to instaled Eclipse for my C++ programing and compiling. I have also instaled Cygwin64 and added the path and things like that. according to the internet it should work now but I get this error:
Problem Occured 'Launching test Debug' has encountered a problem. Error starting process.
In this message 'test' is the name of the class I try to run. Before running I ofcourse Build my project so that is not the problem.
Acording to eclipse there is also an error in the debug map in the makefile file on line 44: #echo 'Building target: $#' (this is what the message says)
My operating system is windows 8 64 bit.
Thanks for reading

Related

Eclipse Cpp g++ command not found (MinGW & CDT Installed)

I am very new in using Eclipse as an IDE and I am facing many problems in configuring it. I may also be asking a few problems that may already be on forum but believe me I've tried almost all that I could have. SO coming towards the problem, I made a simple Hello World program for C++ to test out my config and YES I have installed MinGW and CDT. I have also edited the path environment variable for MinGW, and I chose MinGW GCC as toolchain while creating it and still my simple HELLO WORLD is giving me the error:
/bin/sh: g++: command not found make: *** [src/TEST2.o] Error 127
I have no idea what I have missed in between and it would be very helpful if someone would help me out correctly config my Eclipse :)
PS: I don't know if changing the tool(compiler) in Tool chain editor affects the process but I tried it as well...

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.

Dev-C++ giving error for Makefile.win and g++ stopping

I have installed Dev-C++, but when I make a C program and run it, it gives me an error, like:
C:\Users\Ved\Dev-Cpp\Makefile.win [Build Error] [Project1.exe] Error 1
And when I checked the log it shows the following:
Compiler: Default compiler
Building Makefile: "C:\Users\Ved\Dev-Cpp\Makefile.win"
Executing make...
make.exe -f "C:\Users\Ved\Dev-Cpp\Makefile.win" all
gcc.exe main.o -o "Project1.exe" -L"C:/Users/Ved/Dev-Cpp/lib"
gcc.exe: Internal error: Aborted (program collect2)
Please submit a full bug report.
See <URL:http://www.mingw.org/bugs.shtml> for instructions.
make.exe: *** [Project1.exe] Error 1
Execution terminated
I have used Dev-C++ on my friends computer running Windows XP SP3, and it runs fine and gives the output.
I am using Windows 8 64 bit, can I actually run Dev-C++ on 64 bit?
And can this error be fixed?
I have used the old Dev-C++ in the past and I've have had it break randomly on me at times..
Bloodshed Dev-C++ hasn't been updated for years and development has actually stopped on it.
If you really like the environment consider getting the updated and maintained Orwell Dev C++ that is improved, faster and much cleaner.
This is Solution to Solve error easily
Close All, then Go to Project options and in linker tab write the following and click ok:
-lopengl32
-lfreeglut
-lglu32
Now execute the program
Just close all the other tab in project. It will run normally
Check if in the compiler directory there is g++.exe.
If you can see it go to:
Installing c++/g++ on Windows
and download the file full.exe then follow the instruction and put the directory in path. After that restart your pc, go to the cmd and try to compile there. If it works change the toolchain of the IDE. If you need help contact me :)

Debugger for C++ eclipse gives the following error. 'Launching program name' has encountered a ... Error while launching command: gdb --version

I've always worked around the debugger issue, but now it has gotten too annoying. I'm working on more complex programs and can't anywhere if I cant debug my programs. Has any one else been able to fix this issue in eclipse? It works for java, but not more my C++ plugin from minGW
Debbugger for C++ eclipse gives the following error. 'Launching program name' has encountered a problem. Error while launching command: gdb --version
Assuming you are using Windows and have MinGW installed, you only need to locate the gdb executable in the MinGW bin folder. This can be done on the "Main" tab in the "Debugger" configuration of Eclipse:

Running a Hello World application in Eclipse C++ in Windows

I've just downloaded and put to run Eclipse C++, in Windows, as well as MinGW (I've set its bin/ directory in the PATH variable).
When trying to compile a Hello World program, I get the following error:
**** Build of configuration Default for project tests ****
(Cannot run program "make" (in directory "D:\lixo\eclipse_cpp\workspace\tests"): CreateProcess error=2, The system cannot find the file specified)
Trying to run the make command from the command line yielded nothing, so I figured out that MinGW's make was called MinGW32_make.exe. I've renamed the file to make.exe, but the problem persists.
What am I missing?
Run the 32bit Eclipse instead, and make sure you're running a MinGW toolchain.
Not a solution, but a generally good enough workaround.