我正在尝试在Mac上为iOS和Mac构建libunwind,我能够解决一些编译问题。
在Mac上构建
我使用
配置了项目./configure CC="cc -Ae -D_XOPEN_SOURCE=500"
并从google的breakpad项目中复制了elf.h
。
https://google-breakpad.googlecode.com/svn-history/r1017/trunk/src/common/android/include/elf.h
我现在收到以下错误:
/usr/include/elf.h:58:15: fatal error: 'elf.h' file not found
#include_next <elf.h>
任何人都可以帮我解决这个问题吗?或者还有其他一些构建libunwind的程序吗?
我还想知道是否还需要做其他事情来为iOS构建libunwind。
答案 0 :(得分:1)
我从libunwind开发者论坛得到了答案。
I don't think it will work. There's no OS X support in libunwind at the moment,
and the platform is quite different.
There is a sort of a libunwind (which has little or nothing to do with this one) in the
OS itself though. See http://opensource.apple.com/source/libunwind/
There's also some sort of symbolization library for post-processing. IIRC
you more or less want to use the tools that ship with base OS or at least Xcode,
otherwise you are up against writing quite a lot of tooling yourself.
简而言之,Mac OS X不支持libunwind。
答案 1 :(得分:0)
libunwind包含在clang中,并且从MacOS 10.6开始受支持