I know there are quite a few threads about this, but none seemed to help for me so far. My problem is i am getting a linker error for debug builds: Undefined symbols for architecture arm64:.
I used to have the opposite problem of duplicate symbols when trying to archive (debug was working then), i then noticed and removed duplicate dependencies manually linked and mentioned in my podfile (namely a lot of react native RCT...). Afterwards i was able to archive, but not to debug build anymore.
I tried a lot of different solutions, but i am still getting the same error. I have CxxBridge included in my podfile, i do clean before i try any of the solutions. But still no luck so far. This is very annoying at the moment. Does anybody have an idea?
Related
I'm developing an iOS (>=13.0) app, it's already on the App Store etc...
The problem is that today I've tried to implement the Facebook SDK to permit me to create ad on Facebook and Instagram, I've added the FacebookCore CocosPod and then, as the guide said, I've added on "Other Linker Flags" the flag "-ObjC", since I've added this flag nothing worked, nothing.
I've got several time this error:
ld: 665 duplicate symbols for architecture x86_64 clang: error: linker command failed with exit code 1 (use -v to see invocation)
and all my frameworks files became red.
I've tried to clean up my code, the project, the pod file, I've also removed some pods and the I've put them back because I read some treads where they said it could be a duplicate problem.
After returning to my original podfile I don't have this issue of "duplicate symbols..." but some components of the library (MDCSnackbarManager) don't work and all frameworks files still reds.
I honestly really need your help because I don't know what to do...
Thanks you, please help me.
UPDATE
I didn't solve the problem, since all the project seems to be corrupted and nothing works as should...
As I mentioned before I've tried to reload the project from a previous backup on GitHub.
Now I'm doing well, the project works and so I tried to check the differences between this project and the corrupted one, but nothing, they are identical in all shades, even the flags are all the same, I've checked all of them in both project.
I'm now pretty confused about the cause of all these problems, I'll figure out what happened and if I'll find something I will tell you.
If you have any idea I'll read it and try to figure out if it will work.
At the moment what I can tell you is to NOT set the flag "-ObjC" and install the FacebookCore pod, don't do that.
Attached is an error readout I've been getting. I've added the proper frameworks in my linked libraries, I've checked my target memberships for implementation files, I just don't know why I'm constantly getting the error below.
My project was building fine the other day, and when I opened up my computer the next morning and tried to build, I was given these error messages. I messed around with the architecture in my build settings, as per advice from other stack overflow questions, and it brought the number of errors from 20 down to 5. Still totally confused on this.
You are getting this error because you have not added AssetsLibrary in your project.
Add that library in "Link Binary With Libraries" your error will be gone.
So I've been trying to add the Semantics3 objective-c code to a project I'm working on. I followed the directions they had on their Github page to no avail, I always get an Undefined symbols for architecture x86_64: linking error, even though prior to creating the builds i made sure valid architectures in build settings contained armv7 armv7s arm64 and that the right targets were selected. I also made sure I was adding the .a file that was in the universal folder in /Product. Not exactly knowing if I built their code right, however, I tried going through "adding a static library to your code" section in http://www.raywenderlich.com/41377/creating-a-static-library-in-ios-tutorial, I do everything correctly, the compiler finds the header files, but then after I add the static library, the project still won't build and I still get the same error. I read through numerous answers on SO and elsewhere online, and nothing I did seemed to fix the issue. What could be wrong?
I'm working on Parse/Facebook login that keeps giving me the following error:
Undefined symbols for architecture x86_64:
"_FBSDKAccessTokenDidChangeNotification", referenced from:
There are over 60+ such errors, not sure why they are appearing since this code is working in a different project. I was copying over some code and this started happening, any advice?
Check if you have the import part copied to your new project as well, so does the dependencies.
When it said undefined symbols, it means the function _FBSDKAccessTokenDidChangeNotification can't be found while compiling, which usually means the correspond framework/SDK/library were not there.
While I'm not sure what caused this issue, the following solution cleared up the error messages:
Go to the main page for the app (on the navigation thing on the left click on your apps name or the top section) -> Build Settings and under Linker Flags, make sure there is nothing in your Other Linker Flags
I'm trying to add CocoaHTTPServer to my project. I encountered many problems on the way - my problem (adding CocoaHTTPServer to a project (and have it working)) is still there - but I've also included the errors and solutions I encountered on the way for others' reference.
First I looked at tutorials on adding a framework, but it didn't look like a framework.
Next I right clicked on my project (on the left sidebar), and manually added it with "add files". I followed the SimpleHTTPServer example but got a "cocoa/cocoa.h" not found error. I searched around and found that Cocoa is for mac and not iOS. But the CocoaHTTPServer description talks about iOS apps too, so I just deleted the samples folder (the error was coming from the DynamicHTTPServer example if I recall.
Then I got a "Lexical or preprocessor issue libxml/parser.h not found" error. I tried adding it as a framework, but that didn't work. I found this tutorial on adding libxml to the header search path (at the end), but I ended up with 46 "Apple Mach-O Linker Error _CFHTTPMessage..." errors, and I decided to ask my question here. I tried this answer but got many Apple Mach-O Linker Errors
I added CFNetwork and Security frameworks (project => build phases => link binary with libraries), and was left with 2 errors:
ld: warning: path '/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator6.1.sdk/usr/lib/libxml2.dylib' following -F not a directory
Undefined symbols for architecture i386:
"_NSlog", referenced from:
-[AppDelegate application:didFinishLaunchingWithOptions:] in AppDelegate.o
ld: symbol(s) not found for architecture i386
clang: error: linker command failed with exit code 1 (use -v to see invocation)
I see i386 which is intel, and not the ARM architecture on iDevices. However, the real problem was I mispelled NSLog (look carefully - it wasn't capitalized in the error message). When I googled this - other possible causes may be missing frameworks.
Now it compiles. When I run the sample application, I get the "server started on X port" and when I go to localhost:X I get the welcome/success screen. When I do the same on my project, I still get the "server started on X port" messages, but when I go to localhost:X the browser gives a "cannot connect" messages. No errors in the XCode console.
There are no errors from [httpServer start:&error] and httpServer.isRunning is true.
So what's the best way to add CocoaHTTPServer to my project? In terms of a clean setup - for example, when I inspect the sample iPhone project, I don't see any of the messy steps to add libxml - I don't even see libxml anywhere at all. And in terms of configuring everything so that it actually works and serves files. Right now, I'm suspecting there may be some project settings that need to be enabled for it to actually be a server.
While adding the external files, have you checked your project as a "Build Target"?