c++ - Setup GDB with QtCreator -


I have a simple project to use OpenCV and cmake, and two source files only segmentation. H and segmentation CPP Are there.

Here is cmakefile:

  project (segment) Cmake_minimum_required (version 2.8) set (CMAKE_BUILD_TYPE debug) set (CMAKE_VERBOSE_MAKEFILE true) if (CMAKE_COMPILER_IS_GNUCXX) Message (position "GCC revealed, compiled flag ") set (CMAKE_CXX_FLAGS" $ {CMAKE_CXX_FLAGS} -O0 -g -std = c ++ 98 -Wall ") Andaif (CMAKE_COMPILER_IS_GNUCXX) find_package (OpenCV required) add_executable (Lulu segmentation.cpp segmentation.h ) target_link_libraries (Lulu $ {OpenCV_LIBS})   

I created a debug build with the case sent to the limiter: -DCMAKE_BUILD_TYPE = debug However QtCreator still leave the break points, and gdb sh Can not interact with OK:

  & amp; "Warning: GDB: failed to set controlled terminal: device \ N inappropriate ioctl"   

How to fix this problem?

project , play and in run settings Check the box that Play in a terminal . This QT Creator is a program inside XTerm (default) that plays well with gdb and will launch & amp; "Warning: GDB: Device for \ N Inappropriate Iioctl: Failed to set controlled terminal" Go away.

By default, when launching a debugger, this will bring the Qt Creator to the foreground and thus the terminal will be hidden which will be hidden. To stop this behavior: Go to Tools , Options , Debugger in the General tab, uncheck the check box Make sure to bring the Qt Creator forward in the foreground .

If you want to change the terminal, you can do this in Options , Environment in the System section Terminal for the original Ubuntu / gnome terminal, set it to / usr / bin / gnome-terminal -x . The parameters of this setting should be given to the terminal to execute external commands or programs.

Comments

Popular posts from this blog

java - ImportError: No module named py4j.java_gateway -

python - Receiving "KeyError" after decoding json result from url -

.net - Creating a new Queue Manager and Queue in Websphere MQ (using C#) -