Unexplained Apple Mach-O liner warning error - xcode

Yesterday i integrated Google's Admobs fine into my Xcode 6.1 project. Everything worked. Today i open Xcode and i receive the following errors...
ld: warning: directory not found for option '-L/Users/Marco/Desktop/SpaceAlien copy 1/Space
ld: warning: directory not found for option '-LAlien'
ld: library not found for -lGoogleAdMobAds
It's 2 yellow warning errors and the RED error doesn't let me build project = GoogleAdMobAds
So I read in Project Navigator for libGoogleAdMobAds.a in target membership to unclick and then click back the check. That works and project builds. However, when i close project open it again, I get the same error. How do I make this error remove permanently? Also, for the ld: warning: directory not found errors I went to build setting then library search paths and i CAN'T delete anything, don't know what to do. Please HELP!

ld: warning: directory not found for option '-L/Users/Marco/Desktop/SpaceAlien copy 1/Space
Problem is because the path contains spaces. Try using quotes with the path: "Users/Marco/Desktop/SpaceAlien copy 1/Space"
or you can use escape "\" character to "fix" the path:
Users/Marco/Desktop/SpaceAlien\ copy\ 1/Space

Related

How to fix a library not found error on Xcode

I use Xcode 11.3.1.
I receive an Xcode project from a coworker that is using Xcode 12.4.
I open the project and try to build it.
I receive the following error:
Library not found for ISO8601DateFormatterValueTransformer
Inside Xcode there are some details:
ld: warning: directory not found for option '-L/Users/catalina/Library/Developer/Xcode/DerivedData/CDA-chskvgcrkhxpgnghuarozjoeymbq/Build/Products/Debug-iphonesimulator/ISO8601DateFormatterValueTransformer'
ld: warning: directory not found for option '-L/Users/catalina/Library/Developer/Xcode/DerivedData/CDA-chskvgcrkhxpgnghuarozjoeymbq/Build/Products/Debug-iphonesimulator/RKValueTransformers'
ld: warning: directory not found for option '-L/Users/catalina/Library/Developer/Xcode/DerivedData/CDA-chskvgcrkhxpgnghuarozjoeymbq/Build/Products/Debug-iphonesimulator/RestKit'
ld: warning: directory not found for option '-L/Users/catalina/Library/Developer/Xcode/DerivedData/CDA-chskvgcrkhxpgnghuarozjoeymbq/Build/Products/Debug-iphonesimulator/SOCKit'
ld: warning: directory not found for option '-L/Users/catalina/Library/Developer/Xcode/DerivedData/CDA-chskvgcrkhxpgnghuarozjoeymbq/Build/Products/Debug-iphonesimulator/TransitionKit'
ld: warning: directory not found for option '-L/Users/catalina/Library/Developer/Xcode/DerivedData/CDA-chskvgcrkhxpgnghuarozjoeymbq/Build/Products/Debug-iphonesimulator/ZBarSDK'
ld: library not found for -lISO8601DateFormatterValueTransformer
clang: error: linker command failed with exit code 1 (use -v to see invocation)
My coworker said to me to delete the Pods folder and run the pod install command. After running the command some libraries are installed on the project.
But when I try to build the project, it fails.
This problem could be related to my Xcode version? I mean, I was trying to compile a project using an old version of Xcode
Or
this is a problem related to not importing correctly the Library?
I find out what was causing the problem.
I open the xcproject file. The correct file to open the project is the xcworkspace file.
The problem is fixed now.

No such file or directory when archiving

I added Firebase to my Xcode project using cocoapods. I can build and it succeeds, I only get this warning:
ld: warning: directory not found for option '-F/Users/.../Library/Developer/Xcode/DerivedData/game-dwgqybwtgjx..../Build/Intermediates/ArchiveIntermediates/game/BuildProductsPath/Release-iphoneos/GoogleToolboxForMac'
ld: warning: directory not found for option '-F/Users/.../Library/Developer/Xcode/DerivedData/game-dwgqybwtgj..../Build/Intermediates/ArchiveIntermediates/game/BuildProductsPath/Release-iphoneos/Protobuf'
The build succeeds but the archive doesn't.
When I click archive I get these warnings and errors:
/Users/..../Library/Developer/Xcode/DerivedData/game-dwgqybwtg.../Build/Intermediates/ArchiveIntermediates/game/InstallationBuildProductsLocation/Applications/game.app/Frameworks/GoogleToolboxForMac.framework: No such file or directory
Managed to fix the problem by updating macOS and Xcode

Warnings for GoogleMaps Framework in test target

After upgrading to Xcode 7.1 and fixing some issues with my cocoapods (I had pods in both the main target and the test target), I now have the following warnings.
ld: warning: directory not found for option
'-F/Users/john/development/OurLatitude/OurLatitude/Pods/GoogleMaps/Frameworks”'
ld: warning: Auto-Linking supplied
'/Users/john/development/OurLatitude/OurLatitude/Pods/GoogleMaps/Frameworks/GoogleMaps.framework/GoogleMaps',
framework linker option at
/Users/john/development/OurLatitude/OurLatitude/Pods/GoogleMaps/Frameworks/GoogleMaps.framework/GoogleMaps
is not a dylib
Originally I did only had the Auto-Linking
warning, but some how managed to pick up the directory not found warning
I have the following in my test target search path:
"$(PODS_ROOT)/GoogleMaps/Frameworks" $(inherited) $(PROJECT_DIR)/Pods/GoogleMaps/Frameworks”
If I delete this entry I get the following error:
ld: framework not found GoogleMaps for architecture i386
at one point I think this was complaining about armv7, I forget what I changed that affected that.
Including the path in my test target searchpath, is just a warning and everything , including the test seem to run, but I would like to get rid of the warning if possible.
Any ideas?
I tried what was suggested in this answer, but it only seemed to make matters worse.

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.

clang: error: no such file or directory

Added JSONKit to an Xcode project and am getting this error:
clang: error: no such file or directory: '/Users/snowcrash/Downloads/ILGeoNames-develop/SampleApp/../JSONKit/JSONKit.m'
clang: error: no input files
Command /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang failed with exit code 1
However, the JSONKit files do appear to be there. E.g.
How do I figure out the problem (and fix it!)?
You need to check Compile resources in the Target Project
You will Find that
JSONKit
is in red color
just delete it and go
you have to check 'copy files' when adding the group else they are left where they are and the path breaks when you move the project
I tried re-adding files, but have no work.
So, I find the .pbxproj file in .xcodeproj, delete rows include the file name, then rebuild, success!

Resources