简体   繁体   中英

Error building xcode project when i add a library with extension .a

I have an Xcode project and I need to add a static library with extension .a who sent me for integrated a functionality. I added the library in Build Phases - Link Binary With Libraries , but when I compile my project with this library I added, I does not compile and shows this error:

could not parse object file /routelibrary/libraryname.a(IosHttp.o): 'Unknown attribute kind (45)Unknown attribute kind (45)Unknown attribute kind (45)', using libLTO version 'Apple LLVM 7.0.0 (clang-700.0.72)' for architecture i386 clang: error: linker command failed with exit code 1 (use -v to see invocation)

Any idea on how can I solve it?

One possible reason is missing Other Linker Flags in your target build settings.

First check if you need to set any Other Linker Flags in documentation of your static library, and if yes, what that flag is.

For example so many libraries needs -ObjC as Other Linker Flags .

To find Other Linker Flags , do following.

  1. Select Build Targets in your Xcode project.
  2. select Build Settings .
  3. In Search Box type Other Linker Flags
  4. check and set your flags here.

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