Search code examples
xcodemacososx-mountain-lion

Xcode: Match-O Linker (Id) Error when building HID Explorer


I want to build the HID Explorer example in Xcode 4, but when I try to build, I get these errors (no matter if its 32 or 64):

Undefined symbols for architecture x86_64:
  "_DisposeMenu", referenced from:
      _Handle_WindowEvents in main.o
  "_GetControl32BitMaximum", referenced from:
      _Handle_EventControlDraw in main.o
  "_GetControl32BitMinimum", referenced from:
      _Handle_EventControlDraw in main.o
  "_GetControl32BitValue", referenced from:
      _Handle_EventControlDraw in main.o
  "_InvalWindowRect", referenced from:
      _SetElementTitle in main.o
  "_SetControl32BitMaximum", referenced from:
      _Update_WindowElementInfo in main.o
  "_SetControl32BitMinimum", referenced from:
      _Update_WindowElementInfo in main.o
  "_SetControl32BitValue", referenced from:
      _DisplayCurrentDeviceElementValue in main.o
  "_SetControlMaximum", referenced from:
      _Build_DeviceMenu in main.o
      _Build_ElementMenu in main.o
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)

I assume, there is a framework missing. Can anyone tell, which one?

Frameworks already included are: CoreFoundation.framework, IOKit.framework, Carbon.framework


Solution

  • Unless you want to re-write the code itself the only valid architectures are (ppc, and i386). I reproduced the exact errors when I tried to build the project with x86_64 included. When I removed that architecture the project built and ran just fine.

    Valid architectures: ppc i386 or just i386

    valid arches