2

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?

DVK
  • 126,886
  • 32
  • 213
  • 327
qbx2
  • 63
  • 1
  • 7

1 Answers1

1

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.

qbx2
  • 63
  • 1
  • 7