So I have this program in C++ that runs fine in ubuntu once compiled. It compiles without errors in Code blocks and runs in Debug mode straight out of the box (I'm using GNU GCC compiler). In my environment settings I have the following:
Shell to run commands in: /bin/sh -c
Terminal to launch console programs: gnome-terminal -t $TITLE -x
When I hit "debug" the program runs as expected, although it does give me that pesky "Failed to set controlling terminal" error that I can't fix but get get told off for asking about here. So when I just hit "run" or "compile and run" it compiles fine but doesn't launch in the terminal (like it does when I hit debug).
Running the compiled program in the terminal manually (outside of code blocks) works fine.
This started happening recently but for the life of me I can't think of any settings that I have changed (I don't usually touch the environment settings) although I did do a bunch of updates recently, so that might have something to do with it. My Code::blocks version is 10.05
Thanks in advance for the help :)
Try this as terminal command:
gnome-terminal --disable-factory --hide-menubar -t $TITLE -x
At least the --disable-factory parameter should be used in my opinion, otherwise gnome-terminal tries to reuse an alrady open terminal, that might lead to problems.
If it still does not work, try the exact command (copied from "Build log") used by C::B to launch the application from inside a terminal to probably get meaningful error-messages.