I am trying to use an I / O kit and am properly bound to an I / O kit.
When I use a function in an I / O set and do not call it in a static function, I get the following error Undefined symbols for architecture x86_64 .
Here is an example of error suppression
static void test(void) { if (IORegisterForSystemPower(...)) { } }
Here is an example that will result in an error.
void test(void) { if (IORegisterForSystemPower(...)) { } }
Any suggestions as to why this is happening?
EDIT:
Here are the exact error messages:
Undefined symbols for architecture x86_64: "_IORegisterForSystemPower", referenced from: _registerNotificaitonUsingIOKit in AppDelegate.o "_IONotificationPortGetRunLoopSource", referenced from: _registerNotificaitonUsingIOKit in AppDelegate.o ld: symbol(s) not found for architecture x86_64 clang: error: linker command failed with exit code 1 (use -v to see invocation)
David
source share