English 中文(简体)
对第3.1.3的汇编提供了“建筑结构的不确定符号i386”
原标题:Compiling for iOS 3.1.3 gives "Undefined symbols for architecture i386"
  • 时间:2011-11-02 09:45:44
  •  标签:
  • iphone
  • xcode

我怎么能够把一个“iOS 3.1.3”的元件编成基-SDK的“iOS 3.1.3”,而不要产生错误信息,说“结构的不确定符号i386”?

在使用SDK“iOS 5.0”基数时,所有东西都会奏效,但我需要根据OS3.1.3确保申请工作。

I use XCode 4.2. My frameworks all point to /Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS3.1.3.sdk/...


BUILD LOG:

Ld "***" normal i386
    cd ***
    setenv MACOSX_DEPLOYMENT_TARGET 10.5
    setenv PATH "/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin:/Developer/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin"
    /Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin/clang
      -arch i386 -isysroot /Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator3.1.3.sdk
      -L/Users/***/Library/Developer/Xcode/DerivedData/***/Build/Products/Debug-iphonesimulator
      -F/Users/***/Library/Developer/Xcode/DerivedData/***/Build/Products/Debug-iphonesimulator
      -filelist "/Users/***/Library/Developer/Xcode/DerivedData/***/Build/Intermediates/***.build/Debug-iphonesimulator/***.build/Objects-normal/i386/***.LinkFileList"
      -mmacosx-version-min=10.5
      -Xlinker -objc_abi_version
      -Xlinker 2 -Xlinker -no_implicit_dylibs
      -D__IPHONE_OS_VERSION_MIN_REQUIRED=30000 -lsqlite3
      -framework Foundation -framework UIKit -framework CoreGraphics
      -o "/Users/***/Library/Developer/Xcode/DerivedData/***/Build/Products/Debug-iphonesimulator/***.app/***"

Undefined symbols for architecture i386:
  "_OBJC_CLASS_$_NSAutoreleasePool", referenced from:
  "_OBJC_CLASS_$_NSDictionary", referenced from:
  "_OBJC_CLASS_$_NSDecimalNumber", referenced from:
  "_OBJC_CLASS_$_NSMutableCharacterSet", referenced from:
(and 50 more)

ld: symbol(s) not found for architecture i386
clang: error: linker command failed with exit code 1 (use -v to see invocation)
最佳回答

您应始终根据最新的SDK进行汇编。 如果你需要支持旧装置,那么你需要改变“部署目标”的建筑环境,并测试真正的装置(因为 Apple果不再供应3x模拟器)。

问题回答

看来,你的问题更多地与装置/模拟器有关(即386次指你ma中的星座),而不是3.1.3 和5. 。

Try to change MACOSX_DEPLOYMENT_TARGET inbuilding context to 10.6 or Compiler Default

Remove and read your frameworks.





相关问题
How to change out-of-focus text selection color in Xcode?

Okay, I ll bite. I ve got really pleasant code/window colors set up in Xcode. Ordinarily, my selection color is very visible. When I am doing a project search and iterating through the results, ...

Iphone NSTimer Issue

Hi I am new to objective c. I am trying to make an app for iphone. I have a button on my view, and the click on which the function playSound is called. This is working properly. It does plays the ...

Include a .txt file in a .h in C++?

I have a number of places where I need to re-use some template code. Many classes need these items In a .h could I do something like: #include <xxx.txt> and place all of this code in the ....

Iterating over string/strlen with umlauted characters

This is a follow-up to my previous question . I succeeded in implementing the algorithm for checking umlauted characters. The next problem comes from iterating over all characters in a string. I do ...

Xcode open two editor windows with same file

Is it possible to open the same file in two separate windows in Xcode. I can open a file in one window and the same file in the main Xcode editor window, but I wanted two separate fulltime editor ...

Forcing code signing refresh in Xcode

In our environment, we share resources across multiple projects and platforms. When building for iPhone, only a subset of those resources are needed. Since that subset is still considerable, we have ...

热门标签