2012-01-20 9 views
1

xcode 4.2で静的ライブラリを作成しようとしています。iOSで静的ライブラリを使用する「アーキテクチャi386の未定義シンボル」

私はthisチュートリアルの手順に従っています。ただし、次のエラーが発生します。

Ld /Users/harishk/Library/Developer/Xcode/DerivedData/Testlib-ailufzhcoulmzrflyhfgbwqbiksx/Build/Products/Debug-iphonesimulator/Testlib.app/Testlib normal i386 
    cd /Users/harishk/Desktop/sl/Testlib 
    setenv MACOSX_DEPLOYMENT_TARGET 10.6 
    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/iPhoneSimulator5.0.sdk -L/Users/harishk/Library/Developer/Xcode/DerivedData/Testlib-ailufzhcoulmzrflyhfgbwqbiksx/Build/Products/Debug-iphonesimulator -L/Users/harishk/Desktop/sl/Testlib/Testlib/lib -L/Users/harishk/Desktop/sl/Testlib/../lib -L/Users/harishk/Desktop/sl/Testlib -F/Users/harishk/Library/Developer/Xcode/DerivedData/Testlib-ailufzhcoulmzrflyhfgbwqbiksx/Build/Products/Debug-iphonesimulator -filelist /Users/harishk/Library/Developer/Xcode/DerivedData/Testlib-ailufzhcoulmzrflyhfgbwqbiksx/Build/Intermediates/Testlib.build/Debug-iphonesimulator/Testlib.build/Objects-normal/i386/Testlib.LinkFileList -mmacosx-version-min=10.6 -Xlinker -objc_abi_version -Xlinker 2 -objC -all_load -Xlinker -no_implicit_dylibs -D__IPHONE_OS_VERSION_MIN_REQUIRED=50000 -framework UIKit -framework Foundation -framework CoreGraphics -lSimpleLibrary -o /Users/harishk/Library/Developer/Xcode/DerivedData/Testlib-ailufzhcoulmzrflyhfgbwqbiksx/Build/Products/Debug-iphonesimulator/Testlib.app/Testlib 

ld: warning: ignoring file /Users/harishk/Desktop/sl/lib/libSimpleLibrary.a, file was built for archive which is not the architecture being linked (i386) 
Undefined symbols for architecture i386: 
    "_OBJC_CLASS_$_MathFunctions", referenced from: 
     objc-class-ref in ViewController.o 
ld: symbol(s) not found for architecture i386 
clang: error: linker command failed with exit code 1 (use -v to see invocation) 
+0

ライブラリを作成しようとしていますか、またはアプリケーションで作成したライブラリを使用しようとしていますか? – Satyam

答えて

1

MathFunctionsクラスがありません。あなたのアプリケーションプロジェクトか、あなたが使っているSimpleLibrary.aから。それがビルドのコンパイルとリンクのステップの一部であることを確認してください。

関連する問題