0

i have got error that look like this.

Undefined symbols for architecture i386:
  "_OBJC_CLASS_$_EGOPhotoViewController", 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)

"_OBJC_CLASS_$_EGOPhotoViewController", referenced from:
Objc-class-ref in ViewController.o
Symbol(s) not found for architecture i386
Linker command failed with exit code 1 (use -v to see invocation)

I have created one ViewController and create one button in that controller codes are

- (IBAction)galleryBtnTapped:(id)sender {
    MyPhoto *photo = [[MyPhoto alloc] initWithImageURL:[NSURL URLWithString:@"http://a3.twimg.com/profile_images/66601193/cactus.jpg"] name:@" First Photo"];
    MyPhoto *photo2 = [[MyPhoto alloc] initWithImageURL:[NSURL URLWithString:@"https://s3.amazonaws.com/twitter_production/profile_images/425948730/DF-Star-Logo.png"] name:@"Second Photo"];
    MyPhotoSource *source = [[MyPhotoSource alloc] initWithPhotos:[NSArray arrayWithObjects:photo, photo2, photo, photo2, photo, photo2, photo, photo2, nil]];

    EGOPhotoViewController *photoController = [[EGOPhotoViewController alloc] initWithPhotoSource:source];
    [self.navigationController pushViewController:photoController animated:YES];

    //[photoController release];
    //[photo release];
    //[photo2 release];
    //[source release];
}

and else is same as this project from github

2 Answers2

0

enter image description herePlease set -fno-objc-arc flag in Compile sources > EGoPhotoViewer.m located at following path

Click on your project > Target Project (don't choose Project Test) > Compile Sources > EGoPhotoViewer.m

iDhaval
  • 7,824
  • 2
  • 21
  • 30
  • I have used option 'add file to "SlidingGallery"',but i am using ARC so it show me so much error. –  Oct 16 '12 at 13:39
  • and if i am use option from build phase,link library it give me error i have mention in my question –  Oct 16 '12 at 13:40
-1

It looks like you're not linking with the correct binaries. To include binaries to a project, you'll have to click on your project file so it shows your targets. From there, go to the "Build phases" tab and, under "Link Binary with Library", make sure your library for EGOPhotoViewer is there.

Here's a screenshot of what it should look like: enter image description here

Simon Germain
  • 6,834
  • 1
  • 27
  • 42