Want to remove duplicate symbol error during compile time xcode ios - ios

I running my code old code in the latest XCode 13.2 iOS 15 version. While running my application I got the following error,
duplicate symbol '__toSelectedDate' in:
/Users/userName/Library/Developer/Xcode/DerivedData/Administrator-ewwyjnbeieucitgvjwslljnpgsqr/Build/Intermediates.noindex/Administrator.build/Debug-iphonesimulator/Administrator.build/Objects-normal/x86_64/BarGraph.o
/Users/userName/Library/Developer/Xcode/DerivedData/Administrator-ewwyjnbeieucitgvjwslljnpgsqr/Build/Intermediates.noindex/Administrator.build/Debug-iphonesimulator/Administrator.build/Objects-normal/x86_64/AdherenceOut.o
duplicate symbol '_y_MarkerLblRange' in:
/Users/userName/Library/Developer/Xcode/DerivedData/Administrator-ewwyjnbeieucitgvjwslljnpgsqr/Build/Intermediates.noindex/Administrator.build/Debug-iphonesimulator/Administrator.build/Objects-normal/x86_64/AppDelegate.o
/Users/userName/Library/Developer/Xcode/DerivedData/Administrator-ewwyjnbeieucitgvjwslljnpgsqr/Build/Intermediates.noindex/Administrator.build/Debug-iphonesimulator/Administrator.build/Objects-normal/x86_64/LoginViewController.o
ld: 2 duplicate symbols for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
I have already cleaned my project & removed derived data but not worked. There is no double import or declaration or added in compile sources in xcode build setting.
My code is perfectly runnable on Xcode 10.1 version for iOS 12 version. But apple does not upgrade the build version to upload the build in-app store why I'm stuck to making a compatible code version with the latest iOS.

I resolved this issue using a change in XCode build settings,
GCC_NO_COMMON_BLOCKS = YES to NO

Related

Error with newest version of Xcode using Firebase?

I recently updated to the newest version of Xcode (7.3.1) and with the use of Firebase in project I receive this error:
ld: warning: directory not found for option '-
F/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS9.3.sdk/Developer/Library/Frameworks'
ld: -bundle and -bitcode_bundle (Xcode setting ENABLE_BITCODE=YES)
cannot be used together
However, I am still able to build and run the project on the simulator. I've tried deleting unnecessary libraries inside the framework paths, but it still gives me this error. Does it have to do with the Firebase frameworks I am using?
Set Build Setting-> Bitcode = NO;(See Below image)

How do I get FMDB on project target iOS 7.1 (below 8)?

I installed FMDB using pods because I need to access a local sqlite database. I liked the library, but unfortunately, if I put a deployment target under iOS 8, I get this error at build
ld: embedded dylibs/frameworks are only supported on iOS 8.0 and later (#rpath/FMDB.framework/FMDB) for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
There is a way to resolve this?
Carthage support for frameworks was added in 2.6. For now, you should be able to specify 2.5.2 2.5 in the Podfile and you should be able to Support iOS 7. I've posted an issue on github on this and we'll see if the Cocoapods configuration can be fixed.

xlslib build success in iOS 7 but failed in iOS 8. How can I do?

I have searched http://sourceforge.net/projects/xlslib/files here and download the library. I added the library into my xcode project like this
My xcode version is 6.4 and my project iOS Deployment Target is 8.0.
After I added it into the project without typing any code, I just built to see if it works.
But I failed and get these information:
ld: building for iOS Simulator, but linking against dylib built for MacOSX file '(MyProject Directory)/xlslib/libxls.3.dylib' for architecture x86_64
clang: error:
linker command failed with exit code 1 (use -v to see invocation)
When I changed iOS Deployment Target to 7.0, build the project by using iOS simulator with iOS version 7.1, it works. Is the library doesn't support iOS 8.0 and later ?
BTW, other link flag is already be empty, what should I do to solve this problem?
Any help would be appreciated.

Linker error when building Unity3D mobile project for iOS in Xcode

I recently updated my OSX to El Capitan and, because of an issue with my previous version of Unity (v 5.0.1 I believe), I was forced to update to the latest version (5.2.1f1). Now, when I build for iOS, I get the following error during the linking process:
ld: framework not found FBSDKCoreKit for architecture armv7
clang: error: linker command failed with exit code 1 (use -v to see invocation)
I am using the Soomla library for in-app purchases and social integration, as well as Parse for the online database. I believe at least one of these libraries could be responsible for this, since they both contain Facebook-related code. In any case, I can't figure out what I need to try next. Both plugins have been updated to their latest versions.
I attempted building with the Mono2x scripting backend first, as usual. Then, I tried changing it to IL2CPP and tried compiling for armv7, arm64, and the Universal architecture options. Nothing worked.
I also tried manually adding the FBSDKCoreKit framework file downloaded from https://developers.facebook.com/docs/ios. This also didn't work, except this time I got a slightly different error:
ld: framework not found FBSDKCoreKit clang: error: linker command
failed with exit code 1 (use -v to see invocation)
I'm not sure why it would say this when I explicitly add the framework into the Xcode project. Could anyone give me any insight?

Failing to archive an App with an iOS6 Device

I finally realised why the 'Archive' option was gray. I needed to select an iOS device.
The only device that I currently have with me has iOS6 installed on it.
It says the following when trying to Archive the app:
ld: warning: ignoring file
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS6.0.sdk/usr/lib/crt1.3.1.o,
file was built for armv7 which is not the architecture being linked
(armv6):
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS6.0.sdk/usr/lib/crt1.3.1.o
ld: entry point (start) undefined. Usually in crt1.o for architecture
armv6 clang: error: linker command failed with exit code 1 (use -v to
see invocation)
But I want to support armv6. What should I do?
EDIT: I tried changing the target from iOS4.0 to iOS 4.2 and said the following:
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/lipo:
/Users/airrider3/Library/Developer/Xcode/DerivedData/TRGame-fvkoniflczyexwhcnmjvozqbuozd/Build/Intermediates/ArchiveIntermediates/AppStore/IntermediateBuildFilesPath/TRGame.build/Release-iphoneos/iOSGame.build/Objects-normal/armv7/Kipos
and
/Users/airrider3/Library/Developer/Xcode/DerivedData/TRGame-fvkoniflczyexwhcnmjvozqbuozd/Build/Intermediates/ArchiveIntermediates/AppStore/IntermediateBuildFilesPath/TRGame.build/Release-iphoneos/iOSGame.build/Objects-normal/armv7/Kipos
have the same architectures (armv7) and can't be in the same fat
output file Command
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/lipo
failed with exit code 1
EDIT: I now managed to archive with just armv7 to iOS 4.0. Is it going to work?
You can't archive an file with IOS6, you need to downgrade to the latest official version to archive.
Edit:
Devices updated to iOS 6 beta can not be restored to earlier versions
of iOS. Registered development devices will be able to upgrade to
future beta releases and the final iOS 6 software.
https://developer.apple.com/devcenter/ios/index.action#
I figured it out. Instead of adding the 'armv6 armv7', I just needed to add 'armv6', as the code for 'armv7' was already written with that other default bizarre code.
That's why it was telling that two armv7 was being built.
Thanks everyone for the help, either way!

Resources