How can I fix Xcode 4.6 LLVM compiler error? - ios

I've just checked out a copy of WordPress for iOS from the Subversion Repository: http://iphone.svn.wordpress.org/trunk/
However trying to compile and run it on the 5.1 or 6.1 simulator gives me a weird error I've never seen before:
clang: error: no such file or directory: '/private/tmp/WordPress.build/WordPressComApiCredentials.m'
clang: error: no input files
Command /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang failed with exit code 1
I have already tired to clean the project and reset the simulator but that didn't help either. From other posts I understand that something about "clang" is set in the code - but I don't know what it is.
Could someone point me in the right direction?
Thanks in advance!

Related

clang: error: no such file or directory: 'CoreTelephony'

I'm trying to build my app, It was all working fine until I built and archived a version to send to Apple (Which built fine but then Apple couldn't launch it) Since then I keep getting errors such as:
clang: error: no such file or directory: 'CoreTelephony'
Or:
clang: error: no such file or directory: '__entitlements'
I've searched through my project and cannot find any mention of CoreTelephony or __entitlements. I currently cannot build my app or test it. I've spent hours searching through my project but just cannot find anything to do with these files.
Can anyone advise me on what I can do to get rid of these errors?
Many thanks.
Andrew

Xcode build error on simulator clang: error: no such file or directory: '__entitlements'

I have a react native app with Pods included. It works and runs fine on actual device, but recently when I try to run it on Simulator, I get this weird error clang: error: no such file or directory: '__entitlements'.
Any ideas what could be causing it?
I was running into this issue and I figured out a solution. In my specific instance I had a wayward -force_load argument in the 'additional linker flags' without a path specified. I believe this was causing some arguments to become out of place with the linking. Once I removed this, the error stopped.
I found the problem, I had this in the Build Settings in Other Linker Flag
Other Linker Flag = (
"$(inherited)",
"-ObjC",
"-force_load",
);
remove -force_load.Then Clean and Build your Project and then try again.

clang: error: linker command failed with exit code 1 (use -v to see invocation) Bitcode Fix NOT Working

I'm trying to move an Xcode app from a MBP to an iMac. I've copied all the folders and files needed but keep getting to following error on build:
clang: error: linker command failed with exit code 1 (use -v to see invocation)
After Googling around a bit the most common fix for this is to set Bitcode to no. I've done this but it doesn't make a difference. I've also tried quitting Xcode emptying the DerivedData folder and restarting.
Below is the error in Full:
Here is a list of my linked libraries:
It sounds a lot like the error is true - have you definitely got your libWikitude framework in a referenced path?
Go to XCode, Build Settings, find 'Framework Search Paths' under Search Paths, and make sure the folder of your libWikitude is correct.
Perhaps it's hardcoded and now the path has changed?
After a few headaches with this I decided to simply remove all references to the Wikitude lib as it was not being used by the app.
This immediately solved the issue. Thanks for those who answered.

Xcode 7 compilerc command failed error

I just upgraded Xcode to 7.1 recently. Now I cannot compile my code. It says:
The following build commands failed:
CompileC
/Users/User_Name/Library/Developer/Xcode/DerivedData/StudywizSchool-bbmsbrwirrgkhwghtalynzbkavjz/Build/Intermediates/StudywizSchool.build/Release-iphoneos/StudywizSchool.build/Objects-normal/armv7/SWELockerItem-570C86C95F8D9976.o
shared/model/SWELockerItem.m normal armv7 objective-c
com.apple.compilers.llvm.clang.1_0.compiler
While I don't know why it failed I thought llvm compiler should be higher than 1.0? If so how could I upgrade it? Thanks in advance!
This means that the error is in the SWELockerItem.m file.
You can find ‘SWELockerItem.m’ keywords in the log(Cmd+F), maybe you can find the error message like this, and it's the real error =。=
I hope this will work -
Change your Deployment Target and then clean and run the application.

ld: building for iOS Simulator, but linking against dylib?

I'm having a issue compiling my app for Simulator. In the device runs perfectly but once I tried it to compile in simulator I get the following error:
ld: building for iOS Simulator, but linking against dylib built for MacOSX file '/Applications/Xcode.app/Contents/Developer/Library/Frameworks/XCTest.framework/XCTest' for architecture i386
clang: error: linker command failed with exit code 1 (use -v to see invocation)
I checked before posting this question, but the answers I found in stackoverflow, like to run this,
export PATH=/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xct‌oolchain/usr/bin:/Applications/Xcode.app/Contents/Developer/usr/bin:$PATH
or
The problem was that Xcode 5 replaces gcc with clang and adds in a "-triple" option that specifies OSX as the target. If you pass "-miphoneos-version-min=7.0" on both gcc command lines it works. You can see the clang command line if you pass "--verbose" to gcc. It's also necessary to add to the PATH for Xcode 5 so that cmake can find the necessary tools: export PATH=/Applications/Xcode5-DP6.app/Contents/Developer/Toolchains/XcodeDefault.xct‌​oolchain/usr/bin:/Applications/Xcode5-DP6.app/Contents/Developer/usr/bin:$PATH None of this is official.. but works for me so far.
I dont really understand how to to do this. Any help, please?
Check Build Settings for your test target. This values should look similar:
If you have any escaped symbol, consider to fix it. I had here : \". I just removed them
Also notice: order is important!
P.S. from GraehamF It's always a good thing to Build -> Clean and restart Xcode, so the changes to take affect
When I faced this error with an XCode project, I open the file ???.xcodeproj (in a SubLime Text editor) and removed the below lines. The warning will no longer be there!
LIBRARY_SEARCH_PATHS = (
"\"${PROJECT_DIR}/../../../../../usr/lib\"/**",
"\"${PROJECT_DIR}/../../../../../usr/lib\"/**",
);

Resources