问题描述
我已经通过sudo apt-get install在ubuntu 12.04中安装了QTCreator。我的问题是,QTcreator不能识别可执行文件在调试模式,虽然它运行良好没有调试。当我只是运行我的程序。在调试时QTCreator抛出的错误是:
s / Prog:不是可执行格式:
我可以在QtCreator外使用gdb,所有我的工具链只显示了GCC(x86 64位)。
上有同样的问题, Ubuntu 13.10
,我做的是 sudo apt-get install gdb
然后调试器工作正常。虽然我已经在 / usr / bin $ c $中已经有 gdb
和 gdb64
c>, apt
没有说 gdb
已经安装并安装它(也许是升级版)。
同时检查你的工具链,确保你使用 gdb 64-bit
64位
。
我使用 Qt Creator 3.1.0
,也许你应该升级你的 QtCreator
以及。
希望这有助于。
I have installed QTCreator in ubuntu 12.04 through sudo apt-get install. My problem is that QTcreator is not able to recognize the executable in debug mode, although it is running fine without debugging..when I simply run my program. The error which the QTCreator throws at me while debugging is:
s/Prog": not in executable format: File format not recognized
I can use gdb outside QtCreator. All my tool chain just shows me GCC(x86 64 bit)...is this setting fine. If not please recommend.
解决方案 I had the same problem on my Ubuntu 13.10
and what I did was sudo apt-get install gdb
and after that the debugger worked fine. What seemed strange for me, however, is that although I already had gdb
and gdb64
in /usr/bin
, apt
didn't say that gdb
is already installed and it installed it(maybe an upgraded version).
Also check out your tool chain and make sure you're using gdb 64-bit
if your executable is built on 64-bits
.
I use Qt Creator 3.1.0
, maybe you should upgrade your QtCreator
as well.
Hope this helps.
这篇关于在调试C ++程序时,QTCreator不能识别可执行文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!