0

Eclipse will work just fine on my Linux machine. Although when I installed the C/C++ version (Juno) on Windows, the simple Hello World program it creates will not compile. I have tried setting the path to this previous question Eclipse - C++ hello world project's error, but it still does not work. I have attached the screenshot will the displayed errors.

Screenshot

enter image description here

Community
  • 1
  • 1
user2041391
  • 15
  • 1
  • 4
  • There are various suggested solutions in the question you linked to, have you tried all of them? – Vicky Feb 05 '13 at 13:06

4 Answers4

0

It looks like it is not able to find the compiler exe's, put the compiler directory in PATH and it should be able to find them.

Bali C
  • 30,582
  • 35
  • 123
  • 152
  • I installed Cygwin and put the PATH to there, but the same errors are there. Is there another compiler I should use? – user2041391 Feb 05 '13 at 13:21
  • The compiler should be fine. Are there any options in Eclipse to manually specify the location of the g++ files? – Bali C Feb 05 '13 at 13:22
0

You could try Code::Blocks. It makes for a great IDE for C/C++, and is good for editing Java code (it recognizes the scope of all the variables/objects you have declared, but will not execute your code).

Mike Warren
  • 3,796
  • 5
  • 47
  • 99
0

It seems that your PATH is not configured properly. This post configure-eclipse-cdt-to-use-g

looks to be exactly what you are looking for. I hope it helps. Good luck

Community
  • 1
  • 1
Olimpiu POP
  • 5,001
  • 4
  • 34
  • 49
0

You also need to tell eclipse which toolchain you're using, see:

http://help.eclipse.org/galileo/index.jsp?topic=/org.eclipse.cdt.doc.user/reference/cdt_u_prop_build_toolchain.htm

If you run g++ --version from a standard windows command prompt, you should see the version printed. If you don't, windows may not be following the cygwin symlinks required and you could find that the actual executable isn't called g++.exe at all. For example, on my system, the binary actually lives in:

C:\cygwin\bin\gcc-4.exe

I would also ensure that cygwin is installed to a directory which doesn't contain spaces because it has been known to mess with a few things. Also ensure you use the windows directory in your PATH so C:\cygwin etc rather than /cygdrive.

CDT is a little messy to set up for the first time but unfortunately all C++ Windows IDEs are - even MSVC. It's not a bad IDE at all.

fquinner
  • 548
  • 5
  • 16