Reputation: 195
The error is..
Undefined symbols for architecture armv7s:
"ABCD_Initialize(ABCD_data_type*)", referenced from:
-[MyViewController doSomething] in MyViewController.o
ld: symbol(s) not found for architecture armv7s
clang: error: linker command failed with exit code 1 (use -v to see invocation)
I would like to list what all I've done
ABCD_Initialize is a function in header file of the static library i added.
A few things about my app
Environment specs
Mountain Lion + Xcode 4.6 + iOS SDK 6.1
Let me know if you need more information. Any help is appreciated.
Thanks
J0k3r
Upvotes: 2
Views: 2013
Reputation: 89549
My initial answer:
I'd say step 5 is incorrect.
If you're building a library, you want to build for all architectures, not just the "active architecture".
Set that to "NO
" and see how it goes.
My second answer:
Also, make certain you've added "extern "C"
in your library function declarations:
#ifdef __cplusplus
extern "C" {
#endif
ABCD_Initialize(ABCD_data_type*);
#ifdef __cplusplus
}
#endif
which help with demangling the symbols when they are linked against your app. Here's a related question with a decent explanation of what's going on.
Upvotes: 5