Duplicate symbols for architecture armv7 : soomla issue - xcode

I got this error after reimporting the soomla package.
How to solve this?
duplicate symbol _NewBase64Encode_soomla in:
/Users/Nikunj/Unity/2D/NoOneCanDoIt/Build/b2/Libraries/Plugins/iOS/Soomla/libSoomlaiOSCore.a(NSData-Base64.o)
/Users/Nikunj/Unity/2D/NoOneCanDoIt/Build/b2/Libraries/Plugins/iOS/SoomlaShared/libKeeva.a(NSData-Base64.o)
duplicate symbol _NewBase64Decode_soomla in:
/Users/Nikunj/Unity/2D/NoOneCanDoIt/Build/b2/Libraries/Plugins/iOS/Soomla/libSoomlaiOSCore.a(NSData-Base64.o)
/Users/Nikunj/Unity/2D/NoOneCanDoIt/Build/b2/Libraries/Plugins/iOS/SoomlaShared/libKeeva.a(NSData-Base64.o)
duplicate symbol _OBJC_CLASS_$_FBEncryptorAES in:
/Users/Nikunj/Unity/2D/NoOneCanDoIt/Build/b2/Libraries/Plugins/iOS/Soomla/libSoomlaiOSCore.a(FBEncryptorAES.o)
/Users/Nikunj/Unity/2D/NoOneCanDoIt/Build/b2/Libraries/Plugins/iOS/SoomlaShared/libKeeva.a(FBEncryptorAES.o)
duplicate symbol _OBJC_METACLASS_$_FBEncryptorAES in:
/Users/Nikunj/Unity/2D/NoOneCanDoIt/Build/b2/Libraries/Plugins/iOS/Soomla/libSoomlaiOSCore.a(FBEncryptorAES.o)
/Users/Nikunj/Unity/2D/NoOneCanDoIt/Build/b2/Libraries/Plugins/iOS/SoomlaShared/libKeeva.a(FBEncryptorAES.o)
ld: 4 duplicate symbols for architecture armv7
clang: error: linker command failed with exit code 1 (use -v to see invocation)
Showing first 200 warnings only

Unfortunately libKeeva and libSoomlaiOSCore contain the same functions and classes (symbols). You need to exclude one of these libraries or rebuilt one of them not using conflicting symbols (or make it depend on another library).
Another variant is to include one of the libraries to your project as source code.
UPD: it seems like libSoomlaiOSCore and libKeeva is simply two versions of Soomla, so you can just delete one of them.

Related

Errors Compiling xcode and FBSDK

When creating an assembly produces an error.
if through .cdworkspace
duplicate symbol _OBJC_IVAR_$_FBSDKDeviceLoginCodeInfo._verificationURL in:
/Users/admin/Library/Developer/Xcode/DerivedData/Unity-iPhone-hiyuaervseeqdjddnyzvacrngstr/Build/Products/ReleaseForRunning-iphoneos/FBSDKLoginKit/libFBSDKLoginKit.a(FBSDKDeviceLoginCodeInfo.o)
/Users/admin/Desktop/ios_idle/Frameworks/FacebookSDK/Plugins/iOS/FBSDKLoginKit.framework/FBSDKLoginKit(FBSDKDeviceLoginCodeInfo.o)
ld: 1197 duplicate symbols for architecture arm64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
if through .xcodeproj
ld: warning: directory not found for option '-L/Users/admin/Library/Developer/Xcode/DerivedData/Unity-iPhone-aznohbyfwguqcwgiyilrfrsrcddz/Build/Products/ReleaseForRunning-iphoneos/FBSDKCoreKit'
ld: warning: directory not found for option '-L/Users/admin/Library/Developer/Xcode/DerivedData/Unity-iPhone-aznohbyfwguqcwgiyilrfrsrcddz/Build/Products/ReleaseForRunning-iphoneos/FBSDKLoginKit'
ld: warning: directory not found for option '-L/Users/admin/Library/Developer/Xcode/DerivedData/Unity-iPhone-aznohbyfwguqcwgiyilrfrsrcddz/Build/Products/ReleaseForRunning-iphoneos/FBSDKShareKit'
ld: library not found for -lBolts
clang: error: linker command failed with exit code 1 (use -v to see invocation)
how fix it?
I deleted everything in the FacebookSDK folder in my project except for the file FacebookSDK/SDK/Resources/FacebookSettings. I saved this file so I wouldn't have to re add my settings again later. Then I reimported the Facebook SDK.
It seems that the SDK has had some significant hierarchical changes in the recent versions. When updating to one of the newer versions it did not remove all of the redundant files properly, leading to duplicate classes across across the different versions.

ld: 2 duplicate symbols for architecture x86_64

I am a beginner in iOS development. I am developing an application in Xcode 6.4 and I want create a SQlite database in Project. When I am trying to add constant, connection manager and query helper classes in bundle file and build project, I have the following error:
ld: 2 duplicate symbols for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
Thanks to all comment on my question,
I found the solution of ld: 2 duplicate symbols for architecture x86_64, at time of declaration of constant for table name variable, I have used NSObject class file for constant declaration,However this is not correct way to declare constant variable so I used "Header File" and declared constant variable as like below ,
#define registration_table #"registration_table"
UPDATED
If we import .m file instead of .h file that time also we facing duplicate symbols for architecture x86_64 exception, check import file .
Hope so it will help to someone
duplicate symbols 'NotificationTable' in both files, in my case ,just rename one of them and it works!

Ignoring an undefined symbol in a dynamic library from Xcode

I have a symbol that is being referenced in an Xcode dynamic library target, but it is not defined there. I NEED this symbol to be undefined. This is because it will be compiled differently in each process that includes it (based upon some compile time defines).
The dynamic library target in Xcode that fails to link because it contains a reference to this symbol (which is not unexpected), but I know that the symbol will be available at run time. I will be compiling this function into each target that the common library is linked to.
I am trying to get the linker to mark this particular symbol for dynamic lookup at run time.
I have been able to get it to link if I specify "-undefined dynamic_lookup" as one of the "Other Linker Flags" in my Xcode project. The problem is that I don't want to go that far. I know that only 1 symbol is supposed to be undefined. I want all the rest of the symbols to generate errors if they are left as undefined (I want to avoid a run time missing symbol error basically).
I found a ld linker option that seems like it should do what I need (from ld man page):
-U symbol_name
Specified that it is ok for symbol_name to have no definition. With -two_levelnamespace, the resulting symbol will be marked dynamic_lookup which means dyld will search all loaded images.
However, I cannot seem to get it to work. Whenever I specify "-U symbolName" or "-UsymbolName" in the "Other Linker Flags" I am still greeted with this linker error:
Undefined symbols for architecture x86_64:
"_symbolName", referenced from: <various object files>
Am I using -U incorrectly perhaps? Is it not really the option I need, or is it just not working like it is supposed too?
Set -Wl,-undefined,dynamic_lookup to OTHER_LDFLAGS.
Link: Xcode clang link: Build Dynamic Framework (or dylib) not embed dependencies
Setting -Wl,-undefined,dynamic_lookup is dangerous, since it disables all undefined warning.
Use -Wl,-U,symbol_namein OTHER_LDFLAGS to disable warnings for a single symbol.
In Xcode:
Go to Project/Select Target
Click Build Settings
Search Other Linker Flags
Enter options

Duplicate Symbole in xCode, But no duplicate exist

The Problem
Xcode (Version 4.6.1 (4H512)) is complaining a duplicate symbole problem.
duplicate symbol _OBJC_METACLASS_$_PacksStoreHelper in:
/Users/shannoga/Library/Developer/Xcode/DerivedData/English_Club-cyrjamihpabtvtdkvctjwyidupuo/Build/Intermediates/English Club.build/Debug-iphonesimulator/English Club.build/Objects-normal/i386/PacksStoreViewController.o
/Users/shannoga/Library/Developer/Xcode/DerivedData/English_Club-cyrjamihpabtvtdkvctjwyidupuo/Build/Intermediates/English Club.build/Debug-iphonesimulator/English Club.build/Objects-normal/i386/PacksStoreHelper.o
duplicate symbol _OBJC_CLASS_$_PacksStoreHelper in:
/Users/shannoga/Library/Developer/Xcode/DerivedData/English_Club-cyrjamihpabtvtdkvctjwyidupuo/Build/Intermediates/English Club.build/Debug-iphonesimulator/English Club.build/Objects-normal/i386/PacksStoreViewController.o
/Users/shannoga/Library/Developer/Xcode/DerivedData/English_Club-cyrjamihpabtvtdkvctjwyidupuo/Build/Intermediates/English Club.build/Debug-iphonesimulator/English Club.build/Objects-normal/i386/PacksStoreHelper.o
ld: 2 duplicate symbols for architecture i386
clang: error: linker command failed with exit code 1 (use -v to see invocation)
Usually I go to the Target Build Pases -> Compile Sources and look for the duplicate.
This time as you can see there is no duplication there:
What I tried and some wacky stuff :
Deleting Derived Data.
Removing the project and restarted the mac.
I even tried to delete the so called "duplicate" files and here it got even more wacky - The target successfully builded and there was no warning even that the files were not visible in the file navigator. After the build the app works fine but one of the controllers is not visible.
I Alt+Clicked the import statements of the duplicate files in other files that uses them and it gets me onto a "Zombie" file with all the code inside. But I can not see where xCode get the file from.
What the hell could it be?
I am about to shoot myself. Please save me.

getting linker error even after linking the core data.framework to my project target file

I have linked the target file of my project to the coredata.framework in the Build Phases.
But still I am getting 3 linker errors like below:
Undefined symbols for architecture i386:
"_OBJC_CLASS_$_CoreDataTableViewController", referenced from:
_OBJC_CLASS_$_RolesTableViewController in RolesTableViewController.o
"_OBJC_METACLASS_$_CoreDataTableViewController", referenced from:
_OBJC_METACLASS_$_RolesTableViewController in RolesTableViewController.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 getting this problem in 2 coredata examples i was following from the tutorials. I tried to find if i missed a step. I think I am doing some small fundamental error...
Please help, what it could be...
I'm sure this is solved now, but I had the same problem. When you copy the files to your project you need to ensure you put a check next to your project under "Add to targets".

Resources