Come importare iopmlib.h dal kit IO?
-
29-10-2019 - |
Domanda
Sto cercando di svegliare un Mac con il seguente codice,
CFAbsoluteTime currentTime = CFAbsoluteTimeGetCurrent();
CFDateRef wakeFromSleepAt = CFDateCreate(NULL, currentTime + 60);
IOReturn returnCode = IOPMSchedulePowerEvent(wakeFromSleepAt, NULL, CFSTR(kIOPMAutoWakeOrPowerOn));
Ho difficoltà a trovare il framework/intestazione giusto da importare.
sto usando #import <IOKit/pwr_mgt/IOPMLib.h>
Ma il complier si lamenta ancora. Eventuali suggerimenti? Grazie.
Modificare
Sto ricevendo il seguente messaggio di errore
Undefined symbols:
"_IOPMSchedulePowerEvent", referenced from:
Nessuna soluzione corretta
Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow