Skip to main content



      Home
Home » Language IDEs » C / C++ IDE (CDT) » Run a c ++ program in eclipse by opening the windows console (cmd)
Run a c ++ program in eclipse by opening the windows console (cmd) [message #1818493] Tue, 17 December 2019 07:18 Go to next message
Eclipse UserFriend
I compile a program written in c ++ in eclipse that includes non-standard functions such as "kbhit ()". When it runs, I want the windows console (cmd) to open automatically, because the eclipse console does not work for non-standard functions. In ancient eclipses, like Luna or Mars it did work, but from Eclipse Neo it doesn't work anymore. Do you know how I could do it?
Thank you.
Re: Run a c ++ program in eclipse by opening the windows console (cmd) [message #1818497 is a reply to message #1818493] Tue, 17 December 2019 08:55 Go to previous message
Eclipse UserFriend
Why do you think it no longer works?
What happens if you run the program in a system terminal?
Things you should know:

  1. You likely have to defeat buffering for something like kbhit() to work with the Eclipse run console
  2. You can execute cmd.exe from any Run/Debug/ExtTool launcher
  3. Any launcher with Eclipse probably will still be run in the Eclipse console
The second was discussed here which you've already seen.
https://www.eclipse.org/forums/index.php?t=msg&th=898966&goto=1521250&#msg_1521250

You can set the console to no buffering as discussed here though it may not work depending on your OS.
http://www.cplusplus.com/reference/cstdio/setvbuf/

As for kbhit(),
http://www.cplusplus.com/forum/beginner/89434/

[Updated on: Tue, 17 December 2019 14:00] by Moderator

Previous Topic:EPL v2 question
Next Topic:Cannot target the build button
Goto Forum:
  


Current Time: Tue Jun 17 04:19:06 EDT 2025

Powered by FUDForum. Page generated in 0.04336 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top