Duplicate sybmol [SOAPEngine-iOS] - ios

what is the problem here, it builds with real iphone device but when I want to build/run it with iPhone Simulator it show like this
duplicate symbol _DictionaryForNode in:
/Users/**/Library/Developer/Xcode/DerivedData/**-gfeynokufbufhkgjzjzwlijxekpb/Build/Intermediates/**.build/Debug-iphonesimulator/**.build/Objects-normal/i386/XPathQuery.o
/Users/**/Downloads/SOAPEngine-master/SOAPEngine64.framework/SOAPEngine64(SOAPXPathQuery.o)
duplicate symbol _PerformXPathQuery in:
/Users/**/Library/Developer/Xcode/DerivedData/**-gfeynokufbufhkgjzjzwlijxekpb/Build/Intermediates/**.build/Debug-iphonesimulator/**.build/Objects-normal/i386/XPathQuery.o
/Users/**/Downloads/SOAPEngine-master/SOAPEngine64.framework/SOAPEngine64(SOAPXPathQuery.o)
ld: 2 duplicate symbols for architecture i386
clang: error: linker command failed with exit code 1 (use -v to see invocation)
FYI: there is no .m import or duplicate files in Build Phase

Select the target and check out Build Phases. Make sure the same file isn't listed more than once.

if you have XPathQuery.h/m in your project, in SOAPEngine it is already integrated, you need to remove only XPathQuery.m from your project, leave only XPathQuery.h, in the next version of SOAPEngine we'll fix this problem, please open an issue on GitHub for it.

Related

duplicate symbol ___llvm_profile_runtime in

I am implementing Exact target SDK v5.1.1 as mention on link. But encounter an issue as bellow
duplicate symbol ___llvm_profile_runtime in:
/Applications/Xcode 2.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/clang/9.1.0/lib/darwin/libclang_rt.profile_iossim.a(InstrProfilingRuntime.cc.o)
/Users/abhijeetb/Documents/Projects/BitBucket/FixIssue/project_folder/project_name/MarketingCloudSDK/MarketingCloudSDK.framework/MarketingCloudSDK(__llvm_profile_runtime.o)
ld: 1 duplicate symbol for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
In our project, we have -all_load in other linking flag along with -Obj-C, -lc++, -lz, -liconv, If I remove -all_load flag then issue will not occur but not sure about the consequences.
Please guid me to resolved the issue.
Click on your project in Xcode and go to Build phases.
Look for __llvm_profile_runtime.o in compile sources and click on it and remove it from compile sources
Check to see that you aren't compiling the same file more than once.
If you search for __llvm_profile_runtime it should only show up once

XCode 6.4 linker command failed with exit code 1 (use -v to see invocation)

I have been having a linker command problem and can't seem to resolve it. Normally cleaning the project and rebuilding fixes it, or deleting the derived data but this time it will not build.
The file PTKCard should no longer exist so I am not sure why it is mentioning those in the error. Some guidance would be greatly appreciated.
ld: warning: Auto-Linking supplied '/Users/rgainous/Documents/FacebookSDK/FBSDKCoreKit.framework/FBSDKCoreKit', framework linker option at /Users/rgainous/Documents/FacebookSDK/FBSDKCoreKit.framework/FBSDKCoreKit is not a dylib
ld: warning: Auto-Linking supplied '/Users/rgainous/Documents/FacebookSDK/Bolts.framework/Bolts', framework linker option at /Users/rgainous/Documents/FacebookSDK/Bolts.framework/Bolts is not a dylib
duplicate symbol _OBJC_METACLASS_$_PTKCard in:
/Users/rgainous/Library/Developer/Xcode/DerivedData/Runn-fvmsldafsswpesagnpiepcisxrtq/Build/Products/Debug-iphonesimulator/libPaymentKit.a(PTKCard.o)
/Users/rgainous/Library/Developer/Xcode/DerivedData/Runn-fvmsldafsswpesagnpiepcisxrtq/Build/Products/Debug-iphonesimulator/libStripe.a(STPPaymentCardTextField.o)
duplicate symbol _OBJC_CLASS_$_PTKCard in:
/Users/rgainous/Library/Developer/Xcode/DerivedData/Runn-fvmsldafsswpesagnpiepcisxrtq/Build/Products/Debug-iphonesimulator/libPaymentKit.a(PTKCard.o)
/Users/rgainous/Library/Developer/Xcode/DerivedData/Runn-fvmsldafsswpesagnpiepcisxrtq/Build/Products/Debug-iphonesimulator/libStripe.a(STPPaymentCardTextField.o)
duplicate symbol _OBJC_CLASS_$_PTKView in:
/Users/rgainous/Library/Developer/Xcode/DerivedData/Runn-fvmsldafsswpesagnpiepcisxrtq/Build/Products/Debug-iphonesimulator/libPaymentKit.a(PTKView.o)
/Users/rgainous/Library/Developer/Xcode/DerivedData/Runn-fvmsldafsswpesagnpiepcisxrtq/Build/Products/Debug-iphonesimulator/libStripe.a(STPPaymentCardTextField.o)
duplicate symbol _OBJC_METACLASS_$_PTKView in:
/Users/rgainous/Library/Developer/Xcode/DerivedData/Runn-fvmsldafsswpesagnpiepcisxrtq/Build/Products/Debug-iphonesimulator/libPaymentKit.a(PTKView.o)
/Users/rgainous/Library/Developer/Xcode/DerivedData/Runn-fvmsldafsswpesagnpiepcisxrtq/Build/Products/Debug-iphonesimulator/libStripe.a(STPPaymentCardTextField.o)
ld: 4 duplicate symbols for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
Try deleting your derived data. And then clean build then build again.
Solution 1
You need to do this:
Click on your project (targets)
Click on Build Settings
Under Library Search Paths, delete the paths
May be this will help you.
Solution 2
You have duplicate symbol method which means there are duplicate file in project
In your Target's Build Phase, under "Compile Sources" check if there are duplicate file and delete one if you have duplication.
Hope this will help you.

duplicate symbol with a third party lib for arm64. ok with armv7

I am trying to integrate an ad network called 'adsmogo' http://adsmogo.com/.
I got duplicate symbol error for arm64, but it's ok with armv7.
I checked all similar questions on stackoverflow, but no one solved my problem.
duplicate symbol l108 in:
/Users/xxxxxx/Desktop/mm/mm/AdsMoGoLib/AdsMoGoSDK/libAdsMogo.a(AdMoGoView.o)
/Users/xxxxx/Desktop/mm/mm/AdsMoGoLib/AdsMoGoSDK/libAdsMogo.a(AdsMogoMraidJSBridge.o)
ld: 403 duplicate symbols for architecture arm64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
Solution 1
You need to do this:
Click on your project (targets)
Click on Build Settings
Under Library Search Paths, delete the paths
May be this will help you.
Solution 2
You have duplicate symbol method which means there are duplicate file in project
In your Target's Build Phase, under "Compile Sources" check if there are duplicate file and delete one if you have duplication.
Hope this will help you.

Duplicate symbol error in Xcode Build

duplicate symbol _OBJC_IVAR_$_MainPageScreenCollectionReusableView._mainPageScreenHeaderLabel in: /Users/bharathbalaraj/Library/Developer/Xcode/DerivedData/SentientiOS-anuolaqayswdbzakppukvtjatylz/Build/Intermediates/SentientiOS.build/Debug-iphonesimulator/SentientiOS.build/Objects-normal/x86_64/MainPageScreenCollectionReusableView-9480B7CE5B075E6A.o
duplicate symbol _OBJC_METACLASS_$_MainPageScreenCollectionReusableView in: /Users/bharathbalaraj/Library/Developer/Xcode/DerivedData/SentientiOS-anuolaqayswdbzakppukvtjatylz/Build/Intermediates/SentientiOS.build/Debug-iphonesimulator/SentientiOS.build/Objects-normal/x86_64/MainPageScreenCollectionReusableView-9480B7CE5B075E6A.o
duplicate symbol _OBJC_CLASS_$_MainPageScreenCollectionReusableView in: /Users/bharathbalaraj/Library/Developer/Xcode/DerivedData/SentientiOS-anuolaqayswdbzakppukvtjatylz/Build/Intermediates/SentientiOS.build/Debug-iphonesimulator/SentientiOS.build/Objects-normal/x86_64/MainPageScreenCollectionReusableView-9480B7CE5B075E6A.o
ld: 3 duplicate symbols for architecture x86_64 clang: error: linker command failed with exit code 1 (use -v to see invocation) ..
I am getting this error when I compile in xcode. Not sure how this is coming. Does anyone have a clue what is going on here?
You have added to the project same file multiple times. This usually happens when you add file to project, remove and then add it again.
The file causing this issue is MainPageScreenCollectionReusableView.
To resolve this issue go to Target-> Build phases-> in search field enter MainPageScreenCollectionReusableView and remove red ones.
I had similar error and it was #import loop (explained here)
You may need to change few #imports in .h files to #class and make actual #imports in .m files.

Linker command failed: duplicate symbol for architecture i386

I added the XYPieChart folder into my Swift project on XCode 6 but now I'm getting this "Apple Mach-O Linker Error":
duplicate symbol _main in:
/Users/ansariha/Library/Developer/Xcode/DerivedData/Juxta-bjrfrzoyetsowibjdgpcxtesgwtg/Build/Intermediates/Juxta.build/Debug-iphonesimulator/Juxta.build/Objects-normal/i386/AppDelegate-EE692B7EDFB39C7A.o
/Users/ansariha/Library/Developer/Xcode/DerivedData/Juxta-bjrfrzoyetsowibjdgpcxtesgwtg/Build/Intermediates/Juxta.build/Debug-iphonesimulator/Juxta.build/Objects-normal/i386/main.o
ld: 1 duplicate symbol for architecture i386
clang: error: linker command failed with exit code 1 (use -v to see invocation)
Below that it says "1 duplicate symbol for architecture i386" and then below that, the error: "Linker command failed with exit code 1 (use -v to see invocation)".
Has anyone ever seen this before?
Go to your project Bundle in xcode -> Build Phases -> Compile Sources
Check whether one of the files are added twice or not. This might be the case where such things happen.
Your AppDelegate might be added twice. Remove one of them.
Updated:
Some time you accidentally importing the .m file instead of the .h due to which this error comes. Please check and If this is not the reason, then perform the following steps
1- Check Build phases in Target settings.
2- Go to compile source section.
3- Check if any file exists twice or once.
4- If file exist twice delete one.
5- Build again.
This error occurs duplication of file in your project. click on The Project Navigator and search Duplicate file. in your project duplication of Appdelegate class or main. Remove one of file from your project.

Resources