在Mac OSX上安装Qt的调试版本 [英] Installing debug version of Qt on Mac OSX

查看:234
本文介绍了在Mac OSX上安装Qt的调试版本的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我需要逐步完成Qt代码,以帮助解决C ++应用程序中的错误.我已经从此处,并按照此随附的安装说明进行操作:

I need to step through the Qt code to help solve a bug in my C++ application. I've downloaded qt-mac-opensource-src-4.5.2.tar from here and followed the install instructions that came with this:

  1. 将文件解压缩到/tmp.
  2. 键入./configure -debug.
  3. 输入品牌.
  4. 键入sudo make install.
  5. 按照说明编辑PATH环境变量.
  6. DYLD_IMAGE_SUFFIX环境变量设置为_debug.
  1. unpacked the file to /tmp.
  2. typed ./configure -debug.
  3. typed make.
  4. typed sudo make install.
  5. edited the PATH environment variable as instructed.
  6. set the DYLD_IMAGE_SUFFIX environment variable to _debug.

此已安装的Qt和我的Qt应用程序运行了,但是我仍然无法进入Qt代码.

This installed Qt and my Qt application runs, but I still can't step into the Qt code.

我正在使用Xcode 3.1.3,并尝试将可执行信息更改为在加载框架时使用调试后缀".这会产生很多警告,例如:

I'm using Xcode 3.1.3 and tried changing the Executable Info to "use debug suffix when loading frameworks". This generated a lot of warnings like:

警告:找不到目标文件"/private/tmp/qt-mac-opensource-src-4.5.2/src/corelib/.obj/debug-shared/qmalloc.o"-没有调试信息可用于"global/qmalloc.cpp".

警告:找不到目标文件"/private/tmp/qt-mac-opensource-src-4.5.2/src/corelib/.obj/debug-shared/qnumeric.o"-没有调试信息可用于"global/qnumeric.cpp".

,还有很多与qt不相关的警告.

and also a lot of non-qt related warnings.

我将通宵关闭Macbook Pro,我只能假设它清除了tmp目录,因为解压缩的文件不再存在.

I'd shutdown the Macbook Pro overnight, which I can only assume clears the tmp directory as the unpacked file is no longer there.

我认为我可以通过在不使用框架的情况下重建Qt来解决此问题,但这不是解决方法,而是可能会重新引起我注意的解决方法.当每次重建需要3到4个小时时,我也不太愿意这样做.

I think I could fix it by rebuilding Qt without frameworks, but this is more of a work-around than a fix that will probably come back to bite me. I'm also a bit reluctant to do this, when each rebuild takes between 3 and 4 hours.

或者,可以下载二进制文件和调试库吗?

Alternatively, would downloading the binaries and debug libs work?

对于任何有关我所缺少的内容以及如何解决此问题的建议,我将不胜感激.

I'd be grateful for any suggestions on what I'm missing and how I address this.

谢谢.

推荐答案

借助Qt支持,我现在已经解决了此问题.

With the help of Qt support, I've now resolved this.

有两个问题:

  • Qt调试"make install"当前未为_debug东西生成dSYM文件.他们对此提出了一个错误.为了解决这个问题:

  • The Qt debug "make install" doesn't currently generate dSYM files for the _debug stuff. They've raised a bug about this. To get round this:

4a. cd /usr/local/Trolltech/Qt-4.5.2/lib
4b.键入/usr/bin/dsymutil -o QtGui.framework/QtGui_debug.dSYM QtGui.framework/Versions/4/QtGui_debug
4c.对每个Qt框架重复以上操作.

4a. cd /usr/local/Trolltech/Qt-4.5.2/lib
4b. Type /usr/bin/dsymutil -o QtGui.framework/QtGui_debug.dSYM QtGui.framework/Versions/4/QtGui_debug
4c. Repeat for each Qt framework.

每次重新启动时,确实会擦除tmp目录.为了解决这个问题:

The tmp directory does indeed get wiped on each reboot. To get round this:

7-将/tmp/qt-mac-opensource-src-4.5.2的全部内容复制到新目录~/Qt.

7- Copy the entire contents of /tmp/qt-mac-opensource-src-4.5.2 to a new directory ~/Qt .

我还将框架和源代码都添加到了Xcode项目中.

I also added both the frameworks and source code to the Xcode project.

这篇关于在Mac OSX上安装Qt的调试版本的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆