Ios &引用;未定义的建筑符号i386“;试图使用伊卡鲁塞尔

Ios &引用;未定义的建筑符号i386“;试图使用伊卡鲁塞尔,ios,xcode4,Ios,Xcode4,我想用伊卡鲁塞尔(https://github.com/nicklockwood/iCarousel)并将iCarousel.h和iCarousel.m添加到我的项目中(使用Xcode 4.3.1) 但我在尝试分配iCarousel实例(iCarousel从UIView继承)时遇到链接器错误: 链接器完整错误为: Ld "/Users/Me/Library/Developer/Xcode/DerivedData/IMS-eyffphshuxtblseccxpfluamxudo/Build/Pro

我想用伊卡鲁塞尔(https://github.com/nicklockwood/iCarousel)并将iCarousel.h和iCarousel.m添加到我的项目中(使用Xcode 4.3.1)

但我在尝试分配iCarousel实例(iCarousel从UIView继承)时遇到链接器错误:

链接器完整错误为:

Ld "/Users/Me/Library/Developer/Xcode/DerivedData/IMS-eyffphshuxtblseccxpfluamxudo/Build/Products/Debug-iphonesimulator/MyApp.app/MyApp" normal i386
cd /Users/Me/Desktop/IMS/3.2
setenv MACOSX_DEPLOYMENT_TARGET 10.6
setenv PATH "/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin:/Applications/Xcode.app/Contents/Developer/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin"
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang -arch i386 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator5.1.sdk -L/Users/Me/Library/Developer/Xcode/DerivedData/IMS-eyffphshuxtblseccxpfluamxudo/Build/Products/Debug-iphonesimulator -F/Users/Me/Library/Developer/Xcode/DerivedData/IMS-eyffphshuxtblseccxpfluamxudo/Build/Products/Debug-iphonesimulator -filelist "/Users/Me/Library/Developer/Xcode/DerivedData/IMS-eyffphshuxtblseccxpfluamxudo/Build/Intermediates/IMS.build/Debug-iphonesimulator/MyApp.build/Objects-normal/i386/MyApp.LinkFileList" -mmacosx-version-min=10.6 -Xlinker -objc_abi_version -Xlinker 2 -fobjc-arc -Xlinker -no_implicit_dylibs -D__IPHONE_OS_VERSION_MIN_REQUIRED=50100 -framework AssetsLibrary -framework SystemConfiguration -framework MessageUI -framework EventKit -framework MapKit -framework QuartzCore -framework AddressBook -framework UIKit -framework Foundation -framework CoreGraphics -o "/Users/Me/Library/Developer/Xcode/DerivedData/IMS-eyffphshuxtblseccxpfluamxudo/Build/Products/Debug-iphonesimulator/MyApp.app/MyApp"

Undefined symbols for architecture i386:
"_OBJC_CLASS_$_iCarousel", referenced from:
objc-class-ref in IMSCarouselViewController.o
ld: symbol(s) not found for architecture i386
clang: error: linker command failed with exit code 1 (use -v to see invocation)
有一些示例项目演示了iCarousel的使用,这些项目可以很好地编译。我认为我的项目和示例项目之间肯定存在一些构建设置差异,但我不知道它们可能是什么,也不知道如何找到它们。有没有破译链接器消息的技巧来找出问题所在

(我使用的框架/库与示例项目中的框架/库相同)


TIA

即使您已将.h和.m文件添加到项目中,但听起来它们好像没有被编译。在文件检查器(项目左侧)中选择iCarousel.m文件,然后查看文件检查器中的“目标成员资格”设置

它看起来像这样(只选择“iCarousel.m”而不是“AppDelegate.m”):

Ld "/Users/Me/Library/Developer/Xcode/DerivedData/IMS-eyffphshuxtblseccxpfluamxudo/Build/Products/Debug-iphonesimulator/MyApp.app/MyApp" normal i386
cd /Users/Me/Desktop/IMS/3.2
setenv MACOSX_DEPLOYMENT_TARGET 10.6
setenv PATH "/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin:/Applications/Xcode.app/Contents/Developer/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin"
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang -arch i386 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator5.1.sdk -L/Users/Me/Library/Developer/Xcode/DerivedData/IMS-eyffphshuxtblseccxpfluamxudo/Build/Products/Debug-iphonesimulator -F/Users/Me/Library/Developer/Xcode/DerivedData/IMS-eyffphshuxtblseccxpfluamxudo/Build/Products/Debug-iphonesimulator -filelist "/Users/Me/Library/Developer/Xcode/DerivedData/IMS-eyffphshuxtblseccxpfluamxudo/Build/Intermediates/IMS.build/Debug-iphonesimulator/MyApp.build/Objects-normal/i386/MyApp.LinkFileList" -mmacosx-version-min=10.6 -Xlinker -objc_abi_version -Xlinker 2 -fobjc-arc -Xlinker -no_implicit_dylibs -D__IPHONE_OS_VERSION_MIN_REQUIRED=50100 -framework AssetsLibrary -framework SystemConfiguration -framework MessageUI -framework EventKit -framework MapKit -framework QuartzCore -framework AddressBook -framework UIKit -framework Foundation -framework CoreGraphics -o "/Users/Me/Library/Developer/Xcode/DerivedData/IMS-eyffphshuxtblseccxpfluamxudo/Build/Products/Debug-iphonesimulator/MyApp.app/MyApp"

Undefined symbols for architecture i386:
"_OBJC_CLASS_$_iCarousel", referenced from:
objc-class-ref in IMSCarouselViewController.o
ld: symbol(s) not found for architecture i386
clang: error: linker command failed with exit code 1 (use -v to see invocation)