idevicedebug编译失败并显示“未找到ld:符号”

时间:2015-05-25 15:37:11

标签: xcode macos gcc

环境

  • Max OS(Yosemite)
  • xcode 6.3.2
  • C / C ++项目

用例

idevicedebug.c编译为xcode项目

问题描述

  • 在编译项目时,我得到“架构x86_64的未定义符号:”_ decug_info_real“,在idevicedebug.o中引用了类型...,找不到架构x86_64的符号”
  • 项目设置为链接libmobiledevice& libpilist
  • 使用MachO-View我可以看到符号“_debug_info_real”位于“libimobiledevice”
  • 我已经确认“libimobiledevice”与我的项目相关联,因此,如果没有链接,我会得到更多未解析的外部...

为什么我会得到上面提到的未解决的符号错误?我在这里做错了什么?

1 个答案:

答案 0 :(得分:0)

根据Makefile idevicedebug.c,不仅取决于libimobiledevice库,还需要libinternalcommoncommon/debug.h定义debug_info_real):

idevicedebug_SOURCES = idevicedebug.c
idevicedebug_CFLAGS = $(AM_CFLAGS)
idevicedebug_LDFLAGS = $(top_builddir)/common/libinternalcommon.la $(AM_LDFLAGS)
idevicedebug_LDADD = $(top_builddir)/src/libimobiledevice.la

您是否从Xcode项目链接到此库?

相关问题