28

I'm attempting to build a project in Eclipse CDT and the build process fails early on, but then takes minutes to finish computing and finally quit.

How, through the Eclipse IDE, can I stop the build process.

I know there must be some way because I can delete any random file from the Project Explorer and a box pops up with the processes and I can click the red box next to build and it quits. But I shouldn't be required to delete a random file to get that box to pop up. Where is it?

JnBrymn
  • 24,245
  • 28
  • 105
  • 147

4 Answers4

40

There is a "progress view" found at Windows->Show View->other->General->Progress. That has the little red square I need to stop any particular task.

JnBrymn
  • 24,245
  • 28
  • 105
  • 147
  • 6
    You can also call up the _Progress_ view by clicking on the funny icon (no I don't know how to describe it) in the bottom-right of the window by the small progress bar. – crazyscot Sep 18 '10 at 16:28
  • 1
    The problem is that Build console tab is refocused as soon as you select Progress tab giving you no time to stop the process :) – c0dehunter Jul 21 '14 at 12:50
  • 1
    this did not works for me.. I click the button but eclipse goes on copying resources.. – thiagoh Oct 11 '14 at 21:44
  • 1
    @PrimožKralj At least for C/C++, You can disable this through 'Window -> Preferences -> C/C++ -> Build -> Console' - Uncheck 'Bring to top when building' – Shawn Oct 10 '17 at 15:01
  • @PrimožKralj click and drag the progress window tab out into another frame, or to its own window. Then the refocusing won't overlay. – cp.engr Apr 08 '19 at 16:31
6

FYI - there's also a setting in the Properties sheet to "Stop on first build error".

Under the C/C++ Build item in the Properties page, click on the configuration you wish to modify, choose the Behavior tab, and click the checkbox under "Build Settings" ("Stop on first build error").

You can still use John's method to stop the build at any time, but if you're looking to have the build stop when you first encounter an error instead of continuing on, this setting might be helpful.

twokats
  • 520
  • 1
  • 4
  • 12
  • 1
    To find the check-box described: Right-click on the Project in the Project-Explorer -> _Properties_ -> _C/C++ Build_ -> _Behavior_ tab. +1 Works fine, thanks! – Maus Jan 20 '12 at 10:18
  • "Stop on first build error" is enabled in my settings but build continuous. I use it with Cygwin. – Kai K. Jun 19 '13 at 11:43
  • I have it checked but it didn't help. – c0dehunter Jul 21 '14 at 12:44
  • I checked that as well. It doesn't work for me neither. I am using Luna Service Release 1a (4.4.1) with g++. – Hei May 25 '15 at 10:43
  • 1
    "Stop on first build error" don't work at least for me on Eclipse Kepler, build continues. – mrgloom Sep 24 '15 at 12:24
2

I use -Wfatal-errors flag in Makefile in Eclipse to prevent polluting my console

-Wfatal-errors This option causes the compiler to abort compilation on the first error occurred rather than trying to keep going and printing further error messages. https://gcc.gnu.org/onlinedocs/gcc-4.9.2/gcc/Warning-Options.html

mrgloom
  • 20,061
  • 36
  • 171
  • 301
2

You can disable the console's annoying focus-stealing behavior both for the build messages (so you can get the progress dialog to stay open) and for your program's console output (when debugging multiple threads). Go to window->preferences->C/C++/Build/Console and you'll find an option "Bring console to top when building (if present)". Uncheck that and you then can pause the build as you wish. To keep your program output chilled you can go here: http://georgik.sinusgear.com/2011/12/22/how-to-disable-stealing-of-focus-by-console-in-eclipse/