Sha*_*dey 5 debugging macos qt osx-mavericks
我在MacOSX Darwin内核版本14.3.0上安装了Qt 5.4,并且我正在尝试设置LLDB调试器,因为GDB已经从MacOSX中解压缩(因为我没有发现它是默认的).
当我尝试在Qt Creator中的Build&Run工具包中设置调试器选项时,遵循Qt文档中提到的以下步骤:
有关更多信息,请参阅添加调试器.要使用调试器,请在项目的"构建设置"中添加该工具包.
我在构建和运行工具包中将调试器设置为"/ usr/bin/lldb".在我尝试设置断点并在调试模式下运行Qt项目时,按照所提到的各种论坛正确执行所有步骤之后,它不会遇到断点.它运行为"运行"选项不像"调试"模式那样工作.
我有一个小问题,或者可能会询问关于我解决的跟踪错误的建议,但我不知道它是否正确的方法.
尝试运行我在Mac OS X中发送的可执行文件时,出现以下错误
dyld:未加载库:libLocalIPC.1.dylib
引自:/ Users /"我的可执行文件所在的目录"
原因:找不到图像.我通过在项目设置/运行环境下设置环境DYLD_LIBRARY_PATH来修复此问题,其中库路径指向库的首次版本.因此,在版本中构建我的应用程序时,我必须再次使用版本库路径设置库路径.所以此解决方案是不正确.
我之前尝试的另一个解决方案是使用otool -L @ executable_Path/XXX.exe并检查dylib的路径并使用Xcode的install_name工具进行更改,但它也没有用.
示例:MacOS xxx $ otool -L check abc
libLocalIPC.1.dylib (compatibility version 1.0.0, current version 1.0.0)
libxxx.1.dylib (compatibility version 1.0.0, current version 1.0.0)
libqyyy.1.dylib (compatibility version 1.0.0, current version 1.0.0)
libzzz.1.dylib (compatibility version 1.0.0, current version 1.0.0)
/Users/spandey/Qt/5.4/clang_64/lib/QtWebEngineWidgets.framework/Versions/5/QtWebEngineWidgets (compatibility version 5.4.0, current version 5.4.1)
/Users/spandey/Qt/5.4/clang_64/lib/QtWebEngine.framework/Versions/5/QtWebEngine (compatibility version 5.4.0, current version 5.4.1)
/Users/spandey/Qt/5.4/clang_64/lib/QtQuick.framework/Versions/5/QtQuick (compatibility version 5.4.0, current version 5.4.1)
/Users/spandey/Qt/5.4/clang_64/lib/QtGui.framework/Versions/5/QtGui (compatibility version 5.4.0, current version 5.4.1)
Run Code Online (Sandbox Code Playgroud)
在此之后我设置libs libxxx.1.dylib,libyyy.1.dylib和libzzz.1.dylib的路径并再次运行otool -L abc
结果:管理员-Mac-Pro:MacOS spandey $ otool -L abc
abc:/Users/spandey/Desktop/Perforce/launcher/xxx/libxxx.1.dylib(兼容版本1.0.0,当前版本1.0.0)
/Users/spandey/Desktop/Perforce/launcher/ThirdParty/yyy/lib_osx/libqyyy.1.dylib (compatibility version 1.0.0, current version 1.0.0)
/Users/spandey/Desktop/Perforce/launcher/ThirdParty/zzz/debug_osx/libzzz.1.dylib (compatibility version 1.0.0, current version 1.0.0)
/Users/spandey/Qt/5.4/clang_64/lib/QtWebEngineWidgets.framework/Versions/5/QtWebEngineWidgets (compatibility version 5.4.0, current version 5.4.1
Run Code Online (Sandbox Code Playgroud)
MacOS xxx $ ./abc dyld:未加载库:libzzz.1.dylib参考自:/Users/spandey/Desktop/Perforce/launcher/xxx/libxxx.1.dylib原因:未找到图像Trace/BPT陷阱:5
请问有人可以在这两个问题上帮助我,因为我在过去3天尝试过这个问题但没有成功.
| 归档时间: |
|
| 查看次数: |
1091 次 |
| 最近记录: |