user1881371
user1881371

Reputation: 139

trouble build firebreath xcode

sorry for my english

I make a plugin for the browser to firebreath build ois library, it's going to, include the plugin on firebreath and get an error

Undefined symbols for architecture i386:
  "_IOCreatePlugInInterfaceForService", referenced from:
      OIS::MacHIDManager::iterateAndOpenDevices(unsigned int) in libois.a(MacHIDManager.o)
  "_IODestroyPlugInInterface", referenced from:
      OIS::MacHIDManager::iterateAndOpenDevices(unsigned int) in libois.a(MacHIDManager.o)
  "_IOIteratorNext", referenced from:
      OIS::MacHIDManager::iterateAndOpenDevices(unsigned int) in libois.a(MacHIDManager.o)
  "_IOObjectRelease", referenced from:
      OIS::MacHIDManager::iterateAndOpenDevices(unsigned int) in libois.a(MacHIDManager.o)
  "_IORegistryEntryCreateCFProperties", referenced from:
      OIS::MacHIDManager::iterateAndOpenDevices(unsigned int) in libois.a(MacHIDManager.o)
  "_IOServiceGetMatchingServices", referenced from:
      OIS::MacHIDManager::lookUpDevices(int, int) in libois.a(MacHIDManager.o)
  "_IOServiceMatching", referenced from:
      OIS::MacHIDManager::lookUpDevices(int, int) in libois.a(MacHIDManager.o)
  "_kIOMasterPortDefault", referenced from:
      OIS::MacHIDManager::lookUpDevices(int, int) in libois.a(MacHIDManager.o)
ld: symbol(s) not found for architecture i386
clang: error: linker command failed with exit code 1 (use -v to see invocation)

problem in linking? or another? how do I solve it?

Upvotes: 0

Views: 761

Answers (1)

taxilian
taxilian

Reputation: 14324

You seem to not be linking a library that is needed. A quick google search indicates that you need to link to the IOKit framework for at least some of these symbols.

I recommend you look at the Using Libraries page on Firebreath.org for information on how to link to a Mac framework. It'll look something like this:

find_library(FRAMEWORK_IOKIT IOKit)
target_link_libraries(${PROJECT_NAME} ${FRAMEWORK_IOKIT})

This needs to go in Mac/projectDef.cmake somewhere after your add_mac_plugin call.

Upvotes: 2

Related Questions