gpt4 book ai didi

c++ - 在 Eclipse CDT 控制台中传递传输结束 (Ctrl + D) 字符

转载 作者:IT老高 更新时间:2023-10-28 22:01:58 25 4
gpt4 key购买 nike

我有一个 C++ 应用程序,我需要向它发送一个传输结束信号。

我可以在控制台上执行 Ctrl+D,但是当我在 Eclipse 中尝试时,它不起作用。

我正在使用带有 CDT 的 Eclipse Galileo。

最佳答案

这似乎是一个尚未解决的错误:bug 159803 (2015 年 9 月解决,针对 CDT 9.0)

Since Eclipse 3.1 it is possible to signal EOF (using CTRL + D/Z - bindable in key preferences) in console view, and I tested this successfully with Eclipse 3.2.1 using a simple Java app.
CDT on the other hand will not recognize EOF when in console view.
There is one exception though.

If I run a C/C++ Local App and uncheck "Connect process input & output to a terminal" in the main configuration tab, the console view will recognize EOF.

However, this change does not affect the console view when in the Debug perspective. So while debugging it is still impossible for me to send an EOF signal to the running application.

即使它被视为“已解决”,this comment表明问题仍然存在。


4 年后更新(2014 年 12 月),Fernando Gonzalez-Sanchez提到 in the comments :

Workaround checkbox no longer available in UI.
Problem still happening in OpenSUSE 12 & Eclipse CDT Luna 4.4.1.


2015 年 3 月更新:

Muhammad Annaqeeb提到 in the comments :

There is a new workaround mentioned in the bug page:

In Kepler 4.3 eclipse.buildId=4.3.0.M20130911-1000 on Linux the problem still exists in the Java console. I found the following workaround:

"If you leave the console to focus on another view, and then refocus on the console, then Ctrl-D (EOF) works as expected."

关于c++ - 在 Eclipse CDT 控制台中传递传输结束 (Ctrl + D) 字符,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/4711098/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com