在MacOS中编译C ++代码时的dSYM目录 [英] dSYM Directories While Compiling C++ Code in MacOS

查看:220
本文介绍了在MacOS中编译C ++代码时的dSYM目录的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

为什么在Mac中编译C ++总是创建* .dSYM目录?
有一种方法可以禁用它吗?

Why compiling C++ in Mac always create *.dSYM directories? Is there a way to disable that?

推荐答案

这是因为你的Xcode项目被设置为构建调试符号外部dSYM文件。这实际上对发布版本很方便,因为它意味着你可以从你的应用程序中删除调试符号,当用户发送崩溃转储给你,你可以使用原始的dSYM文件生成适当的堆栈跟踪调试。

It's because your Xcode project is set up to build debug symbols with an external dSYM file. This is actually very handy for release builds, as it means that you can strip debug symbols from your app, and when a user sends a crashdump to you, you can use the original dSYM file to generate a proper stacktrace for debugging.

无论如何,您不要需要在您的项目中禁用调试符号生成。相反,只需将调试符号类型更改为DWARF(而不是DWARF with dSYM File)。你也可以使用Stabs,但这是旧的格式。

Anyways, you don't need to disable debug symbol generation in your project. Instead, just change the debug symbol type to DWARF (instead of "DWARF with dSYM File"). You can also use Stabs, but that's the old format.

编辑:我看到你的意思是从命令行,而不是从Xcode 。我不是坐在我的mac atm面前,但我从 gcc4联机帮助页,您可以指定-gstabs使用Stabs格式。

Edit: Ah, I see you meant from the command line, not from Xcode. I'm not sitting in front of my mac atm, but I see from the gcc4 manpage than you can specify -gstabs to use the Stabs format.

这篇关于在MacOS中编译C ++代码时的dSYM目录的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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