5

I'm a newbie in Eclipse. I use Eclipse Indigo and MinGW to program C++. Create build a Hello word project is ok but i can run the program. It have been terminated when lanched !

This is the Build Log (Ctrl + B):

" **** Build of configuration Debug for project Hl ****

**** Internal Builder is used for build **** Nothing to build for Hl

"

This is what I get when press Ctrl + F11 to run : " "

enter image description here

anybody could tell me how to solve that problem ?

Prince John Wesley
  • 62,492
  • 12
  • 87
  • 94
Incpt.Mobis
  • 199
  • 1
  • 2
  • 11
  • Did you choose the MinGW toolchain when creating project? – v01d Oct 20 '11 at 11:38
  • Yes, I've choosen the MinGW tool chain ! – Incpt.Mobis Oct 20 '11 at 12:20
  • 1
    Here is a site with common problems check it out http://max.berger.name/howto/cdt/ar01s05.jsp – v01d Oct 20 '11 at 12:23
  • op ! after a couple of hours finding on the Internet. I found the way to solve the problem: You need to include the "C:\MinGW\bin" to the Path Eviroment: http://www.youtube.com/watch?v=xryv0fCL8us&noredirect=1 – Incpt.Mobis Oct 20 '11 at 13:21
  • Which is one of the solutions in the article above. Nice to hear you've made it. – v01d Oct 20 '11 at 13:23

2 Answers2

2

You need to make sure you include C:\MinGW\bin into the path environment

In addition, make sure that you don't include paths like this -> C:\MinGW\msys\1.0\bin If you do so the built application will crash immediately!

Oliver
  • 928
  • 9
  • 25
1

The MinGW binaries must be in the %PATH%. I would not recommend to clutter the system's Path variable, unless mingw is your one and only tool chain. Instead, in Eclipse do the following:

  1. open the run configuration of your executable (black arrow near the green one
  2. run configurations ...
  3. then select your exe
  4. then go to the tab named "Environment"
  5. press "New ..."
  6. and add a variable named "PATH" with the content "%PATH%;C:\MinGW\bin" (or wherever your MinGW is installed to)

This worked for me on Eclipse Luna in 2016.

smartrahat
  • 5,381
  • 6
  • 47
  • 68
  • I had the same issue and following these steps worked for me. I didn't have any environment variables set when I went into the 'environment' tab. – arooney88 Jan 15 '19 at 23:58