nek023 / QBImagePicker

A clone of UIImagePickerController with multiple selection support.
MIT License
1.78k stars 553 forks source link

Undefined symbols for architecture x86_64 #63

Closed heizo-schulze closed 9 years ago

heizo-schulze commented 9 years ago

I've compiled the framework with default settings, imported it into my project (default iOS architecture). I do have two different Bridging-Header files for the App and its WatchKit Extension. I #import the framework in the App target only. I got an Apple Mach-O Linker Warning: missing required architecture x86_64 in file ... /Frameworks/QBImagePicker.framework/QBImagePicker (2 slices) Undefined symbols for architecture x86_64: "_OBJCCLASS$_QBImagePickerController", referenced from: __TMaCSo23QBImagePickerController in GCFoto.o ld: symbol(s) not found for architecture x86_64 clang: error: linker command failed with exit code 1 (use -v to see invocation)

Any ideas?

nek023 commented 9 years ago

Check that the framework is correctly linked and embedded in the app.

heizo-schulze commented 9 years ago

I am quite sure to do so. Does it matter, that I build the Framework from within Xcode imported it as a regular Framework? I did not installed it via Pods. After some deep research I learned that Frameworks have to be Fat libraries including all platforms, which probably is/was not possible with Xcode. I would prefer to use the Framework with the regular inline Framework handling - not via another tool like Pods…

nek023 commented 9 years ago

I think it doesn't matter.

Did you see the QBImagePickerDemo in the project? Please check again your project settigs is like this:

c57b45287495cda4ea9cb213c9cc415e.png

heizo-schulze commented 9 years ago

I see the QBImagePickerDemo in the project. Indeed, I had not included the framework in Embedded Binaries. Although it had changed nothing, the error stays the same (yes, I've done "clean" before the next build).

Does this might matter? http://stackoverflow.com/questions/28774768/xcode-6-error-missing-required-architecture-i386-when-building-for-ios-simul

nek023 commented 9 years ago

Does this might matter? http://stackoverflow.com/questions/28774768/xcode-6-error-missing-required-architecture-i386-when-building-for-ios-simul

Maybe...

Ideas:

  1. Try Carthage
  2. Copy source files into your project directly
heizo-schulze commented 9 years ago

Solved via cocoapods, finally. After days of research and try-and-error I've become paranoid, because there are tons of header link error discussions out there. The last mistake has been to not include the xcconfig in the test target as well, which will not happen on "pod install". Shame on Apple that Framework export is not possible and therefore integration in a straight forward manner as well.

Thank you for your patience. Solved.

roeik commented 9 years ago

I am having the same problem, I think. And for the last two days I am trying to figure out how to use Carthage or cocapods, it doesn't work. I have tried everything. Why can't I just copy the frmework into the library like you do with any other framework (facebook, parse, etc)? I don't get it! Can you please help me figure how to add this framework properly?

luxis commented 9 years ago

@roeik You should be able to just copy it into your project? That's how I use it..?

roeik commented 9 years ago

Well, I can’t. Usually this is what I do when I add a framework. But this framework needs to be built on you local machine. After 3 days of research it turns out that If you compile it for one architecture (Device) you can’t run it on another architecture (simulator). There is a way to compile it for all architectures but I don’t know how to do it.

roeik commented 9 years ago

@luxis Did you build the framework before you copied it? Or what exactly did you copy?