juggernaut cocoa for iphone breaks with Apple Mach-O Linker (id) Error
-
15-06-2021 - |
Pregunta
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
Solución
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.
This is a slightly different image but I picked it up from a related question's answer I also gave.
Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow