Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 335503 - Terminate Launched Binary Before Build
Summary: Terminate Launched Binary Before Build
Status: NEW
Alias: None
Product: CDT
Classification: Tools
Component: cdt-build (show other bugs)
Version: 8.0   Edit
Hardware: PC Windows XP
: P3 enhancement (vote)
Target Milestone: ---   Edit
Assignee: cdt-build-inbox@eclipse.org CLA
QA Contact: Jonah Graham CLA
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-01-26 14:53 EST by Matt Bigarani CLA
Modified: 2020-09-04 15:17 EDT (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Matt Bigarani CLA 2011-01-26 14:53:09 EST
If the compiled binary is running when attempting to compile, the compile fails because Eclipse/CDT doesn't have permission to overwrite the binary while it's in use. 

The user should be prompted to terminate the old process before starting a re-compile which will fail.
Comment 1 Matt Bigarani CLA 2011-01-26 16:21:42 EST
Steps to reproduce:

1) Compile Application
2) Launch
3) Make a change and re-compile with the application open.

An error like this appears:

c:/qt/2010.02.1/mingw/bin/../lib/gcc/mingw32/4.4.0/../../../../mingw32/bin/ld.exe: cannot open output file debug\app.exe: Permission denied
collect2: ld returned 1 exit status
mingw32-make[1]: *** [debug\app.exe] Error 1
mingw32-make: *** [debug] Error 2
mingw32-make[1]: Leaving directory `C:/workspace/svn/app'
Comment 2 Mohd Yunus Sharum CLA 2013-08-02 00:48:29 EDT
Hi,

I'm also having trouble with this 'terminated by system' issue. Recently i try to compile a simple console-based program. Click build, and no output in the console section, but there is only one line saying 'foo.exe terminated. ...(plus something else)' (except no clear error message of what caused the termination). 

After several times compiling/building without successfully identified the problem, so i tried running the binary manually (from outside the IDE). And guess what? The system produce error message dialog 'The run-time library bar_something.dll is missing ...'! I am using MinGW compiler. This error actually was settled by adding the linker flag options in MinGW linker options.

But i'm still not satisfied with the console. I would like to ask if Eclipse CDT can provide option to execute the binary in separate console window (different thread, that use native console window of the OS). Running example can be found in ConText Editor (a free text editor), which allow options of executing source code - either to capture and view the execution status in built-in console window, OR allow instance of separate console window. So this would be convenient, in case user want to switch between the two execution methods. The 'missing dll' error might be easily identified in the first or second run, rather than left in the dark wandering what happened, without clear explanation.

Thanks.