ObjC Lbrary Usage: Undefined symbols for architecture armv7 - objective-c

I have XCode library I wrote which I use inside Unity3D application.
The library works and now I need to make a change in the implementation, not the interface.
The problem is that in the XCode project created from Unity3D, when I use my library .a file I get this error (I've remove the specific class names).
Undefined symbols for architecture armv7:
"_OBJC_CLASS_$_ABNUnityativeController", referenced from:
_OBJC_CLASS_$_ABUnityNativeController in libABSDK_Unity_NativeController_iOS.a(ABUnityNativeController.o)
"_OBJC_METACLASS_$_ABNativeController", referenced from:
_OBJC_METACLASS_$_ABUnityNativeController in libABSDK_Unity_NativeController_iOS.a(ABUnityNativeController.o)
ld: symbol(s) not found for architecture armv7
clang: error: linker command failed with exit code 1 (use -v to see invocation)
I'm pretty sure the problem is how I compile my library.

I find that my project settings were bad.
When I choose the main project (I also have sub XCode project in it) inside Build Phases -> Link Binary With Libraries I had to add my sub-project which was listed under Workspace directory.

Related

iOS manually exporting library causes issues

I made a library and I want to test it in a dummy project I made. Both projects are made in Objective-C. When I build my library I get a Successful Build message and three files under the Product directory:
FooIOS.bundle
libFooIOS.a
include
I place these three files at the root level of my dummy project and when I open my myDummyProject.xcworkspace file I see them in my project hierarchy. However, when I build my project I get the following error:
Undefined symbols for architecture armv7:
"_OBJC_CLASS_$_FooSelectedPageViewController", referenced from:
objc-class-ref in libFooIOS.a(FooViewController.o)
ld: symbol(s) not found for architecture armv7
clang: error: linker command failed with exit code 1 (use -v to see invocation)
I did away with some of the obvious checks:
Made sure to reference my external library
I also made sure that both my library and project architectures are set as armv7 arm64
I don't know what else to do. I may be missing another configuration step or it may even be the way I declared something in my library that doesn't conform with my dummy project. Or a discrepancy between projects, perhaps? Any hints or leads would be a great help. Thanks.

Undefined symbols for architecture armv7s dealing with Appboy iOS integration

I am trying to integrate appboy into my Xcode 5.1.1 project. I have followed all the steps on their SDK integration page found here: http://documentation.appboy.com/SDK_Integration/iOS. I was able to successfully install the pods, but when I try to compile and run my project I get the following errors:
Undefined symbols for architecture armv7s:
"_OBJC_CLASS_$_Appboy", referenced from:
objc-class-ref in CAppDelegate.o
ld: symbol(s) not found for architecture armv7s
clang: error: linker command failed with exit code 1 (use -v to see invocation)
The code causing this issue it the code to upgrade the app delegate found in CAppDelegate.m under the method application:didFinishLaunchingWithOptions:
[Appboy startWithApiKey:#"(I PUT MY API KEY HERE)"
inApplication:application
withLaunchOptions:launchOptions];
Make sure that your app target includes "$(inherited)" if it is overriding any of the settings of Pods.xcconfig. You can check this under Build Settings >> Your App Target >> Other Linker Flags.
If you need any additional support on this issue, feel free to contact support#appboy.com.

Mach-O Linker Error in Xcode

Ok so I have 2 projects. I want to import a class file from Project 1 to Project 2. When I import the class file. I get a linker error. Here's what it looks like.
Undefined symbols for architecture x86_64:
"_OBJC_CLASS_$_ClassFile1", referenced from:
objc-class-ref in ClassFile2.o
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
How do I fix this?
Your tags include both ios and osx. if you're building an iOS app, check your Architecture setting in your Xcode project. It shouldn't be x86_64.
Possibly, you might have forget adding target to that file. In Xcode, Select the .m file and In the 'File inspector' on the right pane check Target Membership. Ensure that the target is checked for this file.

IOS6 build link error

I build my app link with a static lib,found the errors follow
Undefined symbols for architecture armv7:
"std::_List_node_base::hook(std::_List_node_base*)", referenced from:
std::list<TSendBuf, std::allocator<TSendBuf> >::_M_insert(std::_List_iterator<TSendBuf>, TSendBuf const&) in libCardAnalyLib1.a(SendRecvThread.o)
"std::_List_node_base::unhook()", referenced from:
std::list<TSendBuf, std::allocator<TSendBuf> >::_M_erase(std::_List_iterator<TSendBuf>) in libCardAnalyLib1.a(SendRecvThread.o)
ld: symbol(s) not found for architecture armv7
clang: error: linker command failed with exit code 1 (use -v to see invocation)
Can anyone tell me what is this error? thank you.
And there is C++ code in the app and the lib.
my demo app can not link the lib, shows this error, and the TSendBuf is
typedef struct {
unsigned char szBuf[1200];//1000 fah char
} TSendBuf;
You probably need to add libstdc++.dylib to the list of frameworks/binaries your application links to.
You can do that from target settings / "Build Phases" tab / "Link binary with Libraries" section
Library and app possibly do not match in link-settings.
Check specifically for the the C++ Standard Library setting, under Apple LLVM compiler within the Xcode Build Settings of both, your library and your app. Those need to match.
Supposed that the library in question is nothing you are building yourself, and if that library was built some time ago (pre Xcode 4.5/LLVM 4.1), then the "correct" setting for your app would be libstdc++ (GNU C++ standard library).

Xcode 4 error SDK authorize.net

When trying to compile with Xcode, I am getting the following error:
Undefined symbols for architecture i386:
"_OBJC_CLASS_$_AuthNet", referenced from:
objc-class-ref in ConnectionManager.o
ld: symbol(s) not found for architecture i386
clang: error: linker command failed with exit code 1 (use -v to see invocation)
I am using SDK authorize.net
please help!!
You haven't linked the library to your application. Select the project from the navigator sidebar, select your target, then go to the Build Phases section. Under Link Binary With Libraries, add the AuthNet library.
Sounds like you are not including the libraries correctly.
Make sure that you followed each of these instructions:
Set your Library Search Paths with the path that contains the "Authorize.Net SDK"
library. (ex. "$(SRCROOT)/ANMobilePaymentLib").
Set your Other Linker Flags with "-lxml2" to allow for xml parsing.
Set your Header Search Paths with the path that contains "libxml2" header
files. (ex. "/usr/include/libxml2" with recursive checked).