I have an app with both the Parse and Facebook frameworks installed. Parse was installed by dragging the files to the "Frameworks" folder of the project and selecting "copy if needed", while the Facebook SDK was installed by dragging and not selecting the copy option. Both appear under the Linked Binaries list. The problem appears to be that Bolts is included in both SDKs. I tried just using the Facebook one, producing the following Link-O errors:
Undefined symbols for architecture x86_64:
"_BFTaskMultipleExceptionsException", referenced from:
___53+[PFObject(Private) deleteAllAsync:withSessionToken:]_block_invoke214 in Parse(PFObject.o)
___65+[PFObject(Private) _deepSaveAsync:withCurrentUser:sessionToken:]_block_invoke311 in Parse(PFObject.o)
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
I deleted the link to the Facebook one and tried dragging the Parse one, but the error persisted. I also got the warning that
ld: warning: ignoring file /Users/milesper/Documents/FacebookSDK/Bolts.framework/Bolts, missing required architecture x86_64 in file /Users/milesper/Documents/FacebookSDK/Bolts.framework/Bolts (2 slices)
even though I had deleted the file from the Facebook SDK.
How should I clean up the project and link to the Parse version of Bolts? Is there something else i should be doing?
Turns out the order in which you include/search the frameworks in your project matters.
Here is what I did to work with Parse 1.6.4 and FacebookSDK without CacoaPods
Use the latest version of Bolts. (1.1.4)
Your include paths should be ordered to find Bolt first, then FacebookSDK, then Parse
Well I found it. The problem was that old files (which were now deleted) were being referenced in the "Library Search Paths Flag". Thanks to this post for giving me the idea. All I had to do was delete the old paths and it now works again.
EDIT: It appears that for some situations the order of the search paths matters as well (see below).
That worked for me Temporary workaround for Parse 1.6.4 and Facebook SDK 3.23
Add to your AppDelegate.m or another class following constant after imports and before implementation section:
NSString *const BFTaskMultipleExceptionsException = #"BFMultipleExceptionsException";
The explanation of the bug https://stackoverflow.com/a/29136507/1345244
One hack I found for working around missing symbols, was just redefining the missing symbol again in my code.
The BFTaskMultipleExceptionsException string is defined here like this:
NSString *const BFTaskMultipleExceptionsException = #"BFMultipleExceptionsException";
So maybe just try putting that one line into your code?
From the history on github, it looks like this was just added to Bolts about 19 days ago. Version 1.1.4 of Bolts was released 14 days ago (1.1.3 was from October last year). So it probably is caused by the version mismatch of Bolts that you noticed.
Another option might be to get an older version of Parse from before Bolts 1.1.4 was released.
Presumably this will be fixed once a new Facebook SDK is available with Bolts 1.1.4.
same problem here.
I had both frameworks included with no problem, until I added SponsorPay SDK which needs to add the -ObjC in "Other Linker Flags" on target "Build Settings".
So, in my experience this issue only happens when the flag -ObjC is present.
I tried all the solutions exposed in here but nothing worked for me, I hope anyone can bring more light on how to solve this issue even with the -ObjC flag active.
EDIT:
There's a question related to this, I'll put the link here in case is helpful to someone: Contradicting frameworks on -ObjC
i had some issue, i just remove Parser.framework in
Linked Framework and Libraries and work well.
Related
I am beginning openGL in xcode. I followed the instructions on how to begin detailed here.
In short, I linked the libglfw3.3.1.dylib, libGLEW.1.13.0.dylib and OpenGL framework under build settings, and added /usr/local/include to header search paths.
However, I run into the following error:
ld: library not found for -lglfw3.3.1
I saw other posts about 'library not found' errors recommending linking the frameworks which I assumed to have done from build settings with the 3 libraries mentioned above.
Does anyone have any advice?
You need to add /usr/local/lib to your library search paths as well, assuming that you have installed GLFW there, and assuming that it is in fact libglfw3.3.1.dylib or libglfw3.3.1.a that you have installed there.
I'm adapting an (apparently outdated) Cordova plugin for use in my app (PhoneRTC if you're curious).
As a Linux/CLI guy at heart I've been struggling with XCode for a day, and I managed to iron out most of the deprecated code using a lot of Google and some blind guessing. However, now I'm stuck with a final error during the linking phase:
"Undefined symbols for architechture arm64: "_utf8_nextCharSafeBody", referenced from: [snip]"
The plugin's original installation instructions mention linking the binary to the library libicucore.dylib, but this seems to have been removed in the latest XCode (there are references of the same name with .tbh extensions available but these aren't valid for that dialog - even though I can select them, but whatever).
Some more Googling offered suggestions for linking various *.frameworks instead, but to no avail - the error remains.
Does anyone have any idea what I need to link to to make this function available? Or if it's permanently removed I'd also like to know, although that would involve rebuilding the binaries which wouldn't be something I'm looking forward to...
Or if you don't know, would there be a way to grep through Apple's libraries somehow to see which one is supposed to be defining a missing symbol?
(Needless to say, IF I can get this working it's going to be forked from the original repo and donated back to the community :))
So, I'm not sure what I changed exactly, but suddenly I could add libicucore.tbh as a linked library. I probably changed the build target or something, but in any case the linking error disappeared (to be replaced by a signing error because XCode, but that I can solve).
I searched and searched and couldnt find the answer.
I added google analytics to my project.
I have two projects in the same workspace that use google analytics.
I linked them both. In the past this wasnt an issue.
But then I needed to add another library, so i ran "pod update"
and since then i've been getting this error.
Now, both locations are EXACTLY the same file.
How can I fix this error?
(as a sub note, no .m files were imported, and there are no duplicate library entries in the pbxproj file regarding this thing)
duplicate symbol _UselessFunctionThatExistsSolelySoThatIDontGetErrorsAboutEmptyLibsF474397331760491295374 in:
/Users/Lena/Dev/workspace/app/myapp/../Pods/GoogleUtilities/Libraries/libGTM_NSData+zlib.a(StaticLibraryEmptySourceFile.o)
/Users/Lena/Dev/workspace/app/Pods/GoogleUtilities/Libraries/libGTM_NSData+zlib.a(StaticLibraryEmptySourceFile.o)
ld: 1 duplicate symbol for architecture x86_64
I know there are several other questions here regarding the Linker and Xcode 4, but they don't really relate to my problem.
I've built Allegro 5.1 and it took me a while because of FreeType, but eventually it worked. Now I've written a little Space Invader game using Allegro. But somehow the linker can't find the framework.
What I've done so far:
The Frameworks are located at /Library/Frameworks/ and they have the same structure like all the other frameworks in that place
I've added the frameworks to the "Link Binary With Libraries" tab of my target
I've added them in a "Copy Files" tab on my target with Destination "Frameworks"
I've added the correct path settings in the Build Settings, so the header files can be found
I've done all the right steps, but still I get:
ld: framework not found Allegro-5.1
clang: error: linker command failed with exit code 1 (use -v to see invocation)
I already had a working framework, but it was installed as shared libs and not in "framwork mode". But adding the framework components to the project was kinda hard because they were stored in /usr/local/lib, which can't be selected with the file dialog...
So... I have no idea what else there should be to do. When I had the shared libs it worked, but now with the same setting but different location it doesn't anymore. Tell me if you need more information, I'll provide it!
So, in case someone lands here, with the help of elias in the Allegro IRC I've found the "error":
In my targets Build Settings I had to specify the Framework Search Paths as /Library/Frameworks.
This doesn't really make sense to me, since this is the default directory for the Frameworks on Mac OS X, but whatever...
I've already spent countless hours puzzling over this, utilizing Google searches and other Stack Overflow questions to no avail.
I have an iPhone/iPad universal application, which seems to compile fine when the target is armv6. However, when the device is iPad, I get this warning:
warning: building for SDK 'Device - iPhone OS 3.2' requires an armv7 architecture.
Oddly enough, the app still runs great on iPad in spite of this warning. However, I do want to do things the "right way" what ever that means in this case. When I switch the target architecture to armv7, I get linking errors:
"___restore_vfp_d8_d15_regs", referenced from:
*redacted*
"___save_vfp_d8_d15_regs", referenced from:
*redacted*
ld: symbol(s) not found
collect2: ld returned 1 exit status
The "redacted" portions of the errors are references to the static library to which I'm trying to link.
Here's what I've tried from the many suggestions online. Each of these were suggested more than once without any explanation, which leads me to believe nobody quite understands this problem:
"Never use the drop down menu in the upper left of the XCode window to choose the target. Instead, set this to Base SDK and then the Base SDK to iPhone OS 3.0 in the target configuration. Set the target device to your preferred target (iPad, iPhone OS 3.2 in my situation.)"
This yields the error "Library not found for -lcrt1.3.1.o"
"Make sure that GCC isn't linking against the wrong version of the standard library. (You'll have to make sure the LIBRARY_SEARCH_PATH doesn't have the wrong path in it.)"
My LIBRARY_SEARCH_PATH is already empty, so this doesn't seem relevant.
"Try compiling with GCC 4.0 rather than GCC 4.2."
I get a syntax error inside a UIKit header file. The error is "Syntax error before 'AT_NAME' token." The line is "UIKIT_EXTERN #interface UILocalizedIndexedCollation : NSObject."
Another project compiles just fine with the same target settings, which is really making me question my sanity. Could I be dealing with a corrupt XCode project?
If anyone knows what's actually happening and has a reference or doesn't mind explaining it, I would be so very grateful.
Cheers!
VFP between ARMv7 and ARMv6 differs in various ways. In ARMv7 its usually preferable to use NEON. The problem is your static library depends on VFP in ARMv6 - you either need to compile the library at ARMv7 or keep the whole application at ARMv6.
Reverting back to GCC 4.0 is silly - ARMv7 support was basically nonexistent back then unless Apple backported it.
I had the same errors except it was for armv6. I fixed them by unchecking "Compile for Thumb" in the project settings for the static library and the main project.
try do like this http://groups.google.com/group/three20/browse_thread/thread/31ddbc047aa1b9ae/c4c5827ab0c7a76f
As far as AT_NAME error is concerned one of the possiblity is
Check if you miss the #end in a class.
To know more about AT_NAME error visit the following link
http://iosdevelopertips.com/xcode/error-syntax-error-before-at_name-token.html