symbol(s) not found in XCode, Cocoa application

后端 未结 3 898
暗喜
暗喜 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:30

    Have you added IOKit as a linked framework? In XCode, expand Targets, then your target (BatteryApp I would guess), then Link Binary With Libraries. If you don't see IOKit, you'll want to add it.

    Up at the top of the tree, look for the Frameworks directory. Right-click, Add, Existing Frameworks. Browse to /Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/(appropriate SDK)/System/Library/Frameworks/IOKit.framework, and click OK.

    Even though you added the simulator version of the framework, it is my belief that XCode will automatically switch the library search path as you switch between the Simulator and Device targets, so I think it's OK.

提交回复
热议问题