c++ - 如何在 Qt Creator 中调试 libtool 可执行文件?

标签 c++ linux qt-creator libtool

我有一个 Autotools + libtool 项目,我正在尝试为其设置 Qt Creator。

我通过 Import project --> Import Existing Project 创建了项目。构建 (make) 并运行指定的可执行文件工作正常,但是当我尝试调试时出现错误

not in executable format: File format not recognized

最佳答案

您需要使用 libtool --mode=execute gdb your_program 进行调试,参见 http://www.gnu.org/software/libtool/manual/html_node/Debugging-executables.html

对于 Qt Creator 你可以创建一个脚本

#!/bin/bash
exec libtool --mode=execute /usr/bin/gdb "$@"

Options --> Build & Run --> Debuggers 中指定它(然后在 Kits 页面上选择调试器)

enter image description here

同时检查项目运行设置中的Run In Terminal

enter image description here

关于c++ - 如何在 Qt Creator 中调试 libtool 可执行文件?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/37688369/

相关文章:

linux - 使用 grep 从字典中删除词根已经存在的单词

未启用 qtcreator 示例

c++ - 我怎样才能在qtcreator中全部展开

c++ - __POSIX_VISIBLE 正在破坏我在 cygwin 上的 pthreading

c++ - RapidJSON : Differences between building using Document or Writer

Linux安装问题-R

c++ - 在 Qt 应用程序中编译多个 .cpp 文件

c++ - 为不阻塞且可以重用的子进程创建非阻塞管道

c++ - 从/到字符串的 boost 日期转换错误

c - 获取 GCC 链接器错误 : Linker input file unused because linking is not done