3

When trying to build the app I get a "linker command failed with exit code 1" error. Here is what the error looks like from Xcode:

Undefined symbols for architecture x86_64:
"_OBJC_CLASS_$_MMWormhole", referenced from:
  objc-class-ref in InterfaceController.o
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)

Looks like the Library wasn't biult for x86-architecture but that is just a wild guess from what I have read so far. When I remove the architecture from the valid architechtures in "Build Settings" the error message is gone but I get another one.

Did anybody make some experience with MMWormhole and knows what to do?

mbnz
  • 73
  • 8

1 Answers1

12

My guess is that you only included MMWormHole in your iOS app target and not in your WatchKit extension. If you just import the source code and not a library you need to check the targets for the source code and make sure both the iOS app and the WatchKit extension are selected (see Calling a Method on Watchkit). If you include or build a library, you need to check the settings in both your iOS app and your WatchKit extension and make sure they are both linking against the library.

Community
  • 1
  • 1
Stephen Johnson
  • 5,293
  • 1
  • 23
  • 37
  • 1
    This is correct - I just got the same issue and fixed it. Check the Target Membership for your .m file for MMWormHole and ensure it's selected for the Extension. Thanks @Stephen Johnson ! – AndyOS Apr 02 '15 at 15:21
  • Indeed it was a problem with linking the libraries. I mistakingly linked it in the "Link Binary with libraries" and of course that doesn't work when it is no binary file. I added the library in the "compile sources" list and it worked – mbnz Apr 07 '15 at 10:08