QTCreator does not recognize the executable while debugging C++ program

流过昼夜 提交于 2019-12-13 17:21:53

问题


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.


回答1:


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.



来源:https://stackoverflow.com/questions/15704663/qtcreator-does-not-recognize-the-executable-while-debugging-c-program

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!