2014-12-28 23 views
2

我正在開發一個調整使用IOKit獲取電池信息,但它無法建立。如何使用theos鏈接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不與聯繫。

我該如何解決這個問題?

+0

irc.saurik.com #theos。 –

+1

@MatteoPacini非常感謝!它對我非常有幫助。 – qbx2

回答

1

該問題是由子項目的makefile造成的。

所以我的兩個生成文件包括

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

感謝。