Reputation: 38714
I'm using Qt Creator on Ubuntu to develop C. Whenever I run with the debugger, I get the message warning: GDB: Failed to set controlling terminal: Invalid argument
. This happens even with a hello world
program. How can I solve this?
Upvotes: 12
Views: 23177
Reputation: 2222
Whether this warning is a bug or not, it is informative as a clue that you have the option to tell QtCreator to cause your program to run in a terminal which may be useful for debug output. See Setup GDB with QtCreator to enable this option.
If you don't want a terminal open, then just ignore the warning.
Upvotes: 0
Reputation: 140629
This is a bug in Qt Creator, which is not invoking GDB correctly (either inside a pseudoterminal, or with command line arguments that tell it not to expect to be run inside a pseudoterminal). It is also a bug in GDB, which could figure out for itself that it wasn't being run inside a pseudoterminal and behave accordingly. I suspect the GDB maintainers will take the position that this is Qt Creator's fault, and vice versa, alas.
There is a claimed workaround here: http://www.qtforum.org/article/31905/debugging-qt-application-on-linux.html but it sounds kinda dodgy to me.
Upvotes: 9