4

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

andi1984
  • 676
  • 10
  • 27

2 Answers2

4

I had a similar problem with the following linker error:

Undefined symbols for architecture i386: "_OBJC_CLASS_$_SHK"

I resolved it by adding SHK.m to compiled sources under Project settings->Target->Build Phases. Not sure why SHK.m was not in the compiled sources list, and it was working previous to duplicating the Target. After the duplication I couldn't link any of the targets.

Adding SHKItem.m or SHK.m to compiled sources might help you if they aren't there already.

3

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

Have you added the frameworks?

rasmusnord
  • 56
  • 3
  • Hi, yes I've included all further frameworks stated at the website (in detail the SystemConfiguration, Security and MessageUI framework. Everything ok until there but if I include this example code above for "letshare" with the SHKItem and SHKActionSheet the errors occur. I don't see any differences according to the delivered example code of sharekit. I've also read through the build settings. But I can't find any problem. But I will keep further testing. – andi1984 Aug 09 '11 at 19:06