質問

I tried using juggernaut cocoa:

https://github.com/fpotter/juggernaut-cocoa

Added this line to my code:

        JuggernautClient *client = [[JuggernautClient alloc] initWithHost:@"myhost" port:1740];
    [client subscribe:[NSString stringWithFormat:@"/reports/%@/new", current_unit.unit_id]];


    [[NSNotificationCenter defaultCenter] addObserver:self
                                             selector:@selector(didReceiveMessage:)
                                                 name:JuggernautDidReceiveMessageNotification
                                               object:nil];

And i get the following errors:

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

thanks for response

役に立ちましたか?

解決

When I see this error:

 ld: symbol(s) not found for architecture i386

that tells me JuggernautClient.m isn't being included in the collection of files that makes up your app target. Go to the File Inspector for JuggernautClient.m and set it to be included in your build.

It would look something like this:

This is a slightly different image but I picked it up from a related question's answer I also gave.

ライセンス: CC-BY-SA帰属
所属していません StackOverflow
scroll top