symbol(s) not found in XCode, Cocoa application

后端 未结 3 879
暗喜
暗喜 2020-12-09 14:05

Though I\'ve done some development in Java and and a little in C(++), I\'m totally new to Apple\'s Objective C and XCode.

Thus, I\'m totally stumped by the following

3条回答
  •  南方客
    南方客 (楼主)
    2020-12-09 14:36

    I believe you're correct in thinking that the IOKit framework isn't linked correctly. Here's how you can make sure:

    • Expand the "Targets" group in your groups and files tree and double click on the target that needs the IOKit. (Or right click and choose Get Info) The target's info panel will come up.
    • The first tab of the info panel is where we need to be. The bottom half of the tab is a list of Linked Libraries. The IOKit is probably not in that list, so click the plus button in the bottom left.
    • Scroll down a little bit until you see IOKit.framework. Select that, and click "Add". This will add the IOKit to your framework and link it into the target.

    If you've already added the IOKit framework to your project, then you just need to verify that it's part of the "Link Binary with Libraries" phase of the appropriate target. (Targets group > expand your target > Link Binary with Libraries). If it's not there but it's in your project, then you can either follow the steps above or simply drag and drop the framework from wherever it is in your groups and files tree.

提交回复
热议问题