Search code examples
iossharekitundefined-symbol

"symbol(s) not found for architecture i386" problem using ShareKit


I want to use the http://getsharekit.com framework for future iOS projects. Hence I started testing out the framework.

But I already get the following error:

Undefined symbols for architecture i386:
"_OBJC_CLASS_$_SHKItem", referenced from:
  objc-class-ref in ShareKitTestAppDelegate.o
"_OBJC_CLASS_$_SHKActionSheet", referenced from:
  objc-class-ref in ShareKitTestAppDelegate.o
ld: symbol(s) not found for architecture i386
collect2: ld returned 1 exit status

Often, as far as I know, these problems arise if header files are wrongly imported. But I don't see any error here in the following code where the problem above occurs:

#import "ShareKitTestAppDelegate.h"
#import "SHK.h"
#import "SHKItem.h"
#import "SHKActionSheet.h"
- (IBAction) letshare:(id)sender
{  
   // Create the item to share (in this example, a url)
   NSURL *url = [NSURL URLWithString:@"http://getsharekit.com"];
   SHKItem *item = [SHKItem URL:url title:@"ShareKit is Awesome!"];

   // Get the ShareKit action sheet
   SHKActionSheet *actionSheet = [SHKActionSheet actionSheetForItem:item];

   // Display the action sheet
   [self.window addSubview:actionSheet];
}

I also included the ShareKit Headers Folder into HeaderSearchPath Build-Options, because of searching for all the headers.

But I don't see any error here or anything missed.

Can somebody help me?

With best regards,

Andreas


Solution

  • Read this http://getsharekit.com/install/.

    Have you added the frameworks?