2012-01-01 48 views
0

我想在我的应用程序中创建照片库,我尝试使用Three20和EGOPhotoViewer。我想使用EgoPhotoViewer,但我是编程新手,我不知道如何将EgoPhotoViewer安装到我的应用程序中。当我尝试使用它时,我得到了这个错误:如何在我的应用程序中安装EGOPhotoViewer?

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

有没有这样做的方法?

回答

0

如果EGOPhotoViewer只是几个类(这听起来像),然后将它们拖到您的项目中,#import和@class在适当的文件中。如果它是一个框架,那么将其拖入您的项目并确保它在构建设置中被链接,然后#import <>必要的标题。

您的未定义符号错误仅仅意味着您正在尝试引用一个看不见的,不存在或超出范围的类。

编辑:为了将来的参考,因为我知道你还是一个初学者。当您看到“架构XXXX的未定义符号”时; XXXX是最重要的部分。如果它说armv6或armv7,那么你有一个设备构建问题。如果它说“i386”,那是一个模拟器问题。我猜猜EGOPhotoViewer的类是普遍的,但有些情况下dunderheads决定不为模拟器构建(Dropbox任何人?),并且未定义的架构i386符号会出现。

+0

我又试了一次,但是当我尝试执行以下代码,我得到这个错误: – user1125231 2012-01-01 19:54:21

+0

如果(indexPath.row == 0){ \t \t MyPhoto *照片= [[MyPhoto页头] initWithImageURL:[NSURL URLWithString :@ “https://s3.amazonaws.com/twitter_production/profile_images/425948730/DF-Star-Logo.png”]名称:@ “lskdjf lksjdhfk jsdfh ksjdhf sjdhf ksjdhf ksdjfh ksdjh skdjfh skdfjh”]; MyPhotoSource * source = [[MyPhotoSource alloc] initWithPhotos:[NSArray arrayWithObjects:photo,nil]]; \t \t \t \t EGOPhotoViewController * photoController = [[EGOPhotoViewController alloc] initWithPhotoSource:source]; \t \t [self.navigationController pushViewController:photoController animated:YES]; \t} } – user1125231 2012-01-01 19:57:18

+0

哪里出错? – CodaFi 2012-01-01 20:00:49

相关问题