1, Error screenshot
In Linux installed Qt, happy to write a program, a press F5 debugging, appear these three lines, and then did not reflect:
Debugging starts
Debugging has failed
Debugging has finished
2, Reason
Debugger GDB or its dependent library version problem, I installed the QT5.5.1 version, QTCreator3.5.1, the system from the gdb7.2.
Upgrade GDB to 7.6 first.
Uninstall the old version of GDB:
Rpm-qa | grep gdb
RPM-E--nodeps gdb-7.2-60.el6_4.1.i686
2. Install Texinfo Document System
Yum Install Ncurses-devel
3. Download GdB 7.6.1 Source Pack
Http://ftp.gnu.org/gnu/gdb/gdb-7.6.1.tar.gz
4, into the installation package directory, decompression
TAR-ZXVF gdb-7.6.1.tar.gz
5, configuration, compilation, installation
./configure
Make
sudo make install
Re-debugging also reported "the selected build of GDB does not support Python scripting." It cannot be used in Qt Creator. "
You need to install Python.
3, install Python
Reference URL: http://www.cnblogs.com/dudu/p/4294238.html
3.1. Before installing Python, some things need to be installed:
Yum Groupinstall "Development Tools"
Yum Install Zlib-devel
Yum Install Bzip2-devel
Yum Install Openssl-devel
Yum Install Ncurses-devel
Yum Install Sqlite-devel
3.2, download, decompression (ZC: The following decompression command and in the window right-click File decompression what is the difference. ), compiling, installing Python
“
Cd/home
wget--no-check-certificate Https://www.python.org/ftp/python/2.7.9/Python-2.7.9.tar.xz
Tar XF python-2.7.9.tar.xz
CD Python-2.7.9
./configure--prefix=/usr/local
Make
Make Altinstall
”
3.2.1, pointing the Python command to "/home/python-2.7.9"
Ln-s/usr/local/bin/python2.7/usr/local/bin/python
ZC: Seemingly this step does not need to do, ∵ looked at the "/usr/local/bin/python/python" has pointed to the "/usr/local/bin/python/python2", and "/usr/local/bin/python /python2 "page already points to"/usr/local/bin/python/python2.7 "
3.2.2, check python version
The commands used are:
“
Sh
Python-v
”
The effect of the execution is as follows:
“
[Root@centos python-2.7.9]# SH
sh-4.1# python-v
Python 2.7.9
sh-4.1# exit
Exit
[Root@centos python-2.7.9]#
”
After the installation is complete, reinstall gdb7.6, and in the final configuration, join Python:
./configure--with-python
Make
Make install
Reboot Qtcreator, choose Debugger gdb7.6, you can debug normally.