I have been struggling with the issue of clang error. I am using 4.6.3 xcode. I have added the lJSON in the
Project-->Build settings --> Other linker flags, if you can see the image here..
I get to see the below error in the xcode:
Settings where the ljason value is being stored
Error generated at the Compile time
Ld build/Distribution-iphoneos/HologicSalesUI-ipad4.app/HologicSalesUI-ipad4 normal armv7
cd /Users/development1/Desktop/Hologic_NEw
setenv IPHONEOS_DEPLOYMENT_TARGET 5.0
setenv PATH "/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin:/Applications/Xcode.app/Contents/Developer/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin"
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang++ -arch armv7 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS6.1.sdk -L/Users/development1/Desktop/Hologic_NEw/build/Distribution-iphoneos -Ldist5/JSON-1.1.0.5/Distribution-iphoneos/lib -Ldist5/AMPiPhoneUtilities-1.0.0.7/Distribution-iphoneos/lib -Ldist5/Log4Cocoa-1.0.0.3/Distribution-iphoneos/lib -Ldist5/AMPMessaging-1.1.0.6/Distribution-iphoneos/lib -Ldist5/AMPMessengerBase-1.0.0.7/Distribution-iphoneos/lib -Ldist5/WSMessaging-1.0.0.5/Distribution-iphoneos/lib -F/Users/development1/Desktop/Hologic_NEw/build/Distribution-iphoneos -filelist /Users/development1/Desktop/Hologic_NEw/build/HologicSalesUI-ipad4.build/Distribution-iphoneos/HologicSalesUI-ipad4.build/Objects-normal/armv7/HologicSalesUI-ipad4.LinkFileList -Xlinker -map -Xlinker /Users/development1/Desktop/Hologic_NEw/build/HologicSalesUI-ipad4.build/Distribution-iphoneos/HologicSalesUI-ipad4.build/HologicSalesUI-ipad4-LinkMap-normal-armv7.txt -dead_strip -ObjC -all_load -lAMPMessengerBase -lAMPMessaging -lAMPiPhoneUtilities -lLog4Cocoa_iOS -lWSMessaging "–lJSON" -fobjc-link-runtime -miphoneos-version-min=5.0 -lxml2 -framework CoreData -framework Foundation -framework CoreFoundation -framework SystemConfiguration -lz -weak_framework UIKit -framework QuartzCore -framework Security -framework CoreGraphics -framework AudioToolbox -framework MessageUI -framework MapKit -weak_framework MediaPlayer -framework CFNetwork -framework MobileCoreServices -framework CoreLocation -framework AddressBook -weak_framework CoreTelephony -weak_framework EventKit /Users/development1/Desktop/Hologic_NEw/build/Distribution-iphoneos/libAntenna.4.0.3.8299-ipad4.a -o /Users/development1/Desktop/Hologic_NEw/build/Distribution-iphoneos/HologicSalesUI-ipad4.app/HologicSalesUI-ipad4
clang: error: no such file or directory: '–lJSON'
Honestly, I have no idea on what xcode is trying to do with this. A help greatly appreciated.
Here is the error that is being thrown:
I'm not sure if this is a typo or the problem, but the hyphen you're using for -lJSON isn't the same as all the others, note how it's longer. Try cut and pasting an existing hyphen. Also, do you have the JSON library somewhere on your library path? Did you quote it to make it stand out, if not you should try to find out why it's being quoted.