iOS 5 - Apple LLVM compiler 3.0 error - ipad

I dont know what happen here when I tried to compile with Xcode, the compiler show this statement, "Apple LLVM compiler 3.0 error". It says fatal error that:
file '/Users/integraasp/Dropbox/code/FlipView/Classes/ColorHelper.h' has been modified since the precompiled header was built. It can build and run well on device but I can't test my code on simulator.
Before I got this error, I tried to copy the newest version of my code from dropbox. I don't know what to do since I've changed many line of code.... :'(
I've tried solution from these link, but unfortunately it's not work at all. Is there anyone can help me..? :(
Convert to ARC - LLVM compiler 3.0 Error
LLVM 3.0 compiler error: cast of C pointer type to Objective-C pointer type 'id' requires a bridged cast
**
Finally, I've found the error. :)
**
Well, finally I've found the error. prefix.pch file for this
project declare was not correctly write all of header files of this project. I just
write down manually on prefix.pch all header files from my project
and it's done. :)

Cleaning build folder i.e. Option+Command+Shift+K, not just Product>Clean for the project usually solves this problem.

try following step.
Set the project compiler to "LLVM GCC 4.2", instead of "Apple LLVM 3.0"; ARC is only supported when you use Apple LLVM. To set the project compiler, in your Project, under "Build Settings", and then under "Build Options", there is a settings for "Compiler for Objective-C". Change that value to "LLVM GCC 4.2

Related

clang: error: no such file or directory when trying to run app

I have added flags in compile sources for janrain integration in my app.
When i m trying to run app or archiving build on that time i faced this error.
I already added that file to correct build path and its already contain within project.
Here i attached snaps of that error :
Can anyone please help me to solved this? Thanks in Advance.. :)
Go in your target compile sources and check its may be that you used the filename as compiler flag in ARC or you may used wrong compiler flags.
i hope its worked.
just check your compile sources its may that you give wrong flag for ARC or your file is not available with testtareget.
Just check your flags which u set in compile sources. Either its repeated or either its wrongly used.
This problem raised because of i am passing this class name to set in compile sources flag instead of -fno-objc-arc.
Check with your existing flags in your compile sources its may be that you used the filename as compiler flag.
Check once NPSAuthenticatedUser+Model is existing or not in your project. Whether it is in red color or what.
If it is red color remove and re add it if needed.
Please check this answer.
clang: error: no such file or directory: ASIAuthenticationDialog.m
Clean and Build your Project and then try again.
make sure you in the Other Linker Flags in case you use '$(inherited)', add only $(inherited) without the 2 ''
None of the possible solutions above worked in my scenario.
For a Swift project with Objective-C file(s) included make sure they are not added to the Build Phases -> Compile Sources section of your project's target.
I had a Swift project where after I dragged Objective-C files into the project the implementation files were added to the Build Phases -> Compile Sources section. Once I removed the Objective-C implementation files from the Compile Sources section my project worked happily once again.
This was using Xcode version 8.3 (8E162).

Building Cocoa touch framework with c++11 code

I am trying to make an iOS framework. My code includes c++11 features.
When I build the framework target I get errors such as:
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/ctime:56:9: No member named 'clock_t' in the global namespace
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/ctime:58:9: No member named 'time_t' in the global namespace; did you mean 'size_t'?
How can I resolve this? Thanks.
UPDATE:
Here is my Apple LLVM 6.0 - Language-c++ settings:
Regular iOS project with that c++11 code compiles without errors.
you need to explicitly add libc++ as a linked library under general tab.
I don't know how far it will work fine in your scenario. I got similar kind of error when I tried to compile and build so. I will share what I did :
1.Goto your project Build Settings.
2.Click Build Settings.
3.Search for Apple LLVM 6.0 - Language-c++ .
4.set c++ standard library as libstdc++ .
Then try compile the project.
This might not the exact solution.
I just shared what worked for me when I am facing the similar kind of errors as yours.
Thank you!
Have you tried setting the C++ Language Dialect to C++11? It's in the same place as the C++ standard library setting:
Go to Build Settings
Select your Target, and click Build Settings.
Search for Apple LLVM 6.0 - Language-C++
Set C++ Language Dialect to C++11.
You might also have to set the C++ Standard Library to libc++.
Xcode adds all headers to the "Headers" build phase by default. So, I solved my issue by removing all unnecessary C++ headers from the build phase.

WhiteRaccoon iOS 4.2 errors

I have a app with the WhiteRaccoon framework installed.
I cant compile it as it gives me errors with anything to do with retain or release in WhiteRaccoon.m/h.
Any ideas whats going on?
Thanks.
By the way, I have added the CFNetwork framework. Any ideas?
Your project is probably using ARC and WhiteRaccoon probably isn't.
You can either convert whiteRaccoon (whatever that is) to ARC or exclude the whiteRaccoon files by adding the following compiler flags to it's source files -fno-objc-arc.
To do that click the project on the left hand side then go to the "Build Phases"-> "Compile Sources" look for the white Raccoon .m files and add the -fno-objc-arc under the compiler flags section.
Another option would be to compile the WhiteRaccoon framework into a static library and as this to your project.

ARC Transition Failing: -ccc-arcmt-check argument "unused"

I'm trying to upgrade my iOS project to using ARC.
When starting the conversion via Edit -> Refactor -> Convert to Objective-C ARC, I select my target, deselect linked libraries and press check.
Next I get the following error:
clang: error: argument unused during compilation: '-ccc-arcmt-check'
Command /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang failed with exit code 1
Some idea how to resolve this? Xcode does not even try to start converting the source files.
Note that I've got several targets in my project file sharing some source files. The conversion dialog only displays the target set in the current scheme.
I've already successfully converted another (static library) project, so the Xcode setup should be ok.
EDIT: I've activated Continue building after errors in Xcode's preferences, at least now I see all ARC errors. Let's see if this lets me convert to ARC.
EDIT2: I get this error for every source file of my target, I do not want to use ARC for - so it seems as if the compiler has a problem with concurrent flags -ccc-arcmt-check and -fno-objc-arc.
I found it out: Turn off Treat Warnings as Errors in Project Settings.

iOS project compilation

I am working on a project accessing web service. I found a project
http://d1xzuxjlafny7l.cloudfront.net/downloads/PromoTest.zip
The above code include JSON library [project setting compiler = LLVM 4.2]
And I tried to use partial code of that project in my project.
So I copied the JSON library into my project [my project uses Apple LLVM 3.1]
and then some error show up
eg.
SBJsonStreamWriterState **states;
//error:Pointer to non-const type "SBJsonStreamWriterState *" with no explicit ownership
I have tried using compiler flags -fno-objc-arc, no good.
I wonder if its a ARC problem? if it is, then why above compiler flag wont work.
Try disabling ARC at the target level like shown in the attached picture:
So, I solved it by deleting SBJson Library. I found Apple already written a json library.

Resources