Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Eclipse CDT - how to run compiled .exe in external console (cmd.exe)

Is there a way to run compiled CDT program inside Eclipse IDE, but not in Eclipse terminal, but rather in new cmd.exe window? Some Run configuration or External Tools configuration? Just like in QT, when you run compiled console application.

like image 763
cyclone125 Avatar asked Dec 06 '25 09:12

cyclone125


2 Answers

From Eclipse CDT forum, from Mr Klaus:

Edit the Run Configuration:

On the Main page set C/C++ Application to:

${system_path:cmd.exe}

On the Arguments page add (adjust path and program name):

/C "start .\Debug\hello.exe"

On the Common page untick "Allocate console".

In the example above the console windows will close immediately if hello.exe ends. If you don't want that, use this version on the Arguments page:

/C "start ${system_path:cmd.exe} /K .\Debug\hello.exe"

Btw, you could use the same concept for External Tools configuration also!

like image 187
cyclone125 Avatar answered Dec 08 '25 00:12

cyclone125


In my case i was need to change arguments:

/C "start /WAIT .\Debug\hello.exe"
like image 43
andreykorol Avatar answered Dec 08 '25 00:12

andreykorol



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!