开发者

How to correct "Undefined symbols for architecture x86_64" issues from I/O Kit?

I am running OSX Lion and would like to register for sleep notifications using I/O Kit as referenced here.

When I compile the code开发者_如何学JAVA, I get Undefined symbols for architecture x86_64 for the following symbols IOAllowPowerChange, IORegisterForSystemPower and IONotificationPortGetRunLoopSource.

I searched in Apple's documentation and they are all public functions. Any suggestions as to why I am getting those issues?


I would say you need to link to the IOKit.framework


I'm not too sure why it matters but if I call any of the I/O kit's functions within a static function, the compiler will not report a problem, but if I don't use a static function I get an error.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜