开发者

linking static libraries in iOS5

I am new to iOS 5. Currently working with xcode 4.2,Base sdk iOS 5.0,Apple LLVM compiler 3.0,architechture armv7. Whenever I try to link a static library the following warning comes up.

ld: warning: ignoring file /Users/shilpasurendran/Desktop/InputVal_aslib/InputVal_aslib/iCodeBlogsMathLibrary/libICodeMathUtils.a, file was built for arc开发者_StackOverflow中文版hive which is not the architecture being linked (i386)

I even tried changing deployment targets and compiler,but of no use. Please help. Thanks in advance!!


You are trying to build for armv7 architecture which means you want to build for a real device not the simulator.

The library you are linking to is in i386 architecture meaning it is compiled for the simulator.

When using a third-party library there often is a structure like this:

Library
  build
    Release-iphoneos
    Release-iphonesimulator
    Release-universal

If there is a universal build you should use that one. Try using the one under Release-iphoneos otherwise.

Hope that helps

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜