【问题标题】:How can I link IOKit using theos?如何使用 theos 链接 IOKit?
【发布时间】:2014-12-28 01:37:07
【问题描述】:

我正在开发一个使用 IOKit 获取电池信息的调整,但构建失败。

Undefined symbols for architecture armv7:
  "_IOPSCopyPowerSourcesInfo", referenced from:
      getBatteryPercent(int*) in PRJNAME.mm.3bb88719.o
  "_IOPSCopyPowerSourcesList", referenced from:
      getBatteryPercent(int*) in PRJNAME.mm.3bb88719.o
  "_IOPSGetPowerSourceDescription", referenced from:
      getBatteryPercent(int*) in PRJNAME.mm.3bb88719.o

我已经将libIOKit.dylib 复制到$THEOS/lib/ 并使用makefile,但似乎dylib 没有链接。

我该如何解决这个问题?

【问题讨论】:

  • irc.saurik.com #theos.
  • @MatteoPacini 非常感谢!这对我帮助很大。

标签: ios theos iokit


【解决方案1】:

问题是由子项目的makefile引起的。

所以我的两个 makefile 都包含

XXX_LDFLAGS = -lIOKit -L<Library directory, necessary if the dylib is not in $THEOS/lib>

谢谢。

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2020-10-10
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多