0

我尝试使用剑圣可可:

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

将此行添加到我的代码中:

        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];

我收到以下错误:

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)

感谢您的回复

4

1 回答 1

0

当我看到这个错误时:

 ld: symbol(s) not found for architecture i386

这告诉我 JuggernautClient.m 未包含在构成您的应用程序目标的文件集合中。转到 JuggernautClient.m 的文件检查器并将其设置为包含在您的构建中。

它看起来像这样:

这是一个略有不同的图像,但我从我也给出的相关问题的答案中选择了它。

于 2012-06-20T18:22:10.643 回答