7

I'm trying to conveniently have the updated code in effect when I click the run button in Eclipse. At present it will run the last build and I have to manually click build before clicking run to see the changes.

Can someone advise me on how to configure Eclipse to autobuild the current project (if changes has been made) before running the code?

Java42
  • 7,628
  • 1
  • 32
  • 50
L. D. James
  • 1,679
  • 1
  • 22
  • 35

2 Answers2

17

There are multiple settings for auto building. The one you could be missing is the setting under Launching.

enter image description here

Two other settings are here:

enter image description here

And the last setting is the one you likely already know about:

enter image description here

Java42
  • 7,628
  • 1
  • 32
  • 50
  • 1
    when trying to create a new c++ hello world project, it does not build automatically. Is it compulsory to build each project atleast once manually, it doesn't happen even by applying all the above settings? – shivshnkr Sep 06 '14 at 19:51
  • I would create a new question and add the output you receive when run try to run/launch the program after an edit. – Java42 Sep 06 '14 at 23:59
  • I have already created a question concerning this, still no one has answered ! Here it is : http://stackoverflow.com/questions/25703149/eclipse-cdt-hello-world-project-doesnt-build-automatically – shivshnkr Sep 07 '14 at 11:10
5

If you want to automatically build your project on save (or before run, if needed), then from tool-bar menu go to

Project -> Properties -> C/C++ Build -> Select Behaviour Tab on the right panel, -> tick the "Build on resource save(Auto build)" , finally hit OK

That is it...

Memin
  • 3,788
  • 30
  • 31