Reputation: 73
I'm developing a tweak getting battery information using IOKit, but it fails to build.
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
I have already copied libIOKit.dylib
into $THEOS/lib/
and worked with makefile but it seems the dylib is not linked with.
How can I solve this?
Upvotes: 2
Views: 724
Reputation: 73
The problem was caused by makefile of the subproject.
So my both makefile includes
XXX_LDFLAGS = -lIOKit -L<Library directory, necessary if the dylib is not in $THEOS/lib>
Thanks.
Upvotes: 1