简体   繁体   中英

Linker error on device only

Im getting the follwoing error when compiling for my device

File is universal (3 slices) but does not contain a(n) armv7s slice: /Users/xxx/Desktop/xxxxxxx/DropboxSDK.framework/DropboxSDK for architecture armv7s clang: error: linker command failed with exit code 1 (use -v to see invocation)

Ive checked all .m files are linked and all ok, why is it only doing this on device and what does the compiler want to stop it complaining?

"armv7s" is the instruction set supported by the new ARM processor in the iPhone 5. Xcode 4.5 by default generates binaries for armv7 and armv7s.

The linker error means that your app is compiled for armv7 and armv7s (and i386 for the Simulator), but is linked to the DropboxSDK framework which does not contain armv7s code.

So you have the following options:

  • Download and install the latest DropboxSDK framework. According to the CHANGELOG , iPhone 5 support has been added.
  • Compile your app for "armv7" only. This is configured in the "Architectures" of the "Build Settings" of your target.

You said that "No lib that refers to Dropbox". But there must be some reference to that library, otherwise the linker would not complain. You can check that in the "Link Binary with Libraries" section of the "Build Phases" tab of your target settings.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM