I recently needed to add an ARC file to a non-arc enabled project. There were compiler warnings saying the -fobjc-arc flag needed to be added for the file. To do this in Xcode go to Targets -> Build Phases -> Compiler Sources. Then find the file and add the flag.
http://stackoverflow.com/questions/8768176/how-to-add-arc-for-specific-file
Showing posts with label compiler. Show all posts
Showing posts with label compiler. Show all posts
Saturday, May 31, 2014
Monday, March 10, 2014
"_crypto_sign_ed25519_ref_double_scalarmult_vartime", referenced from:
While trying to build Chartboost v4.1 I get the following error:
"_crypto_sign_ed25519_ref_double_scalarmult_vartime", referenced from:
...
...
This seems to be a problem with Chartboost's latest build.
http://forums.xamarin.com/discussion/13953/linker-error-using-chartboost-binding
"_crypto_sign_ed25519_ref_double_scalarmult_vartime", referenced from:
...
...
This seems to be a problem with Chartboost's latest build.
http://forums.xamarin.com/discussion/13953/linker-error-using-chartboost-binding
Saturday, October 5, 2013
Cannot compile when including Google Analytics
The linker complains it can't find the following:
_llvm_gcda_emit_arcs
_llvm_gcda_emit_function
_llvm_gcda_end_file
_llvm_gcda_increment_indirect_counter
_llvm_gcda_start_file
http://stackoverflow.com/questions/12670204/ios-code-coverage-broken-in-xcode-4-5
Under the target build setting (be sure to select all)
Set:
- Apple LLVM complier
- Instrument Program Flow: YES
- Generate Test Coverage Files: YES
http://stackoverflow.com/questions/12670204/ios-code-coverage-broken-in-xcode-4-5
Sunday, July 14, 2013
Unknown class in Interface Builder file
This error can show up when using Storyboard or Interface Builder. The problem is that no actual code references so the linker optimizes the class out of existence. One solution to select the .m of the class that is giving you trouble. Then show the file inspector (View->Utilities->Show file inspector) and check your target under the Target Membership section.
More info here:
http://stackoverflow.com/questions/1725881/unknown-class-myclass-in-interface-builder-file-error-at-runtime
More info here:
http://stackoverflow.com/questions/1725881/unknown-class-myclass-in-interface-builder-file-error-at-runtime
Sunday, November 6, 2011
Building Error - don't know how to convert instruction
don't know how to convert instruction ea000002 referencing ....
If you are using Xcode 3.2.5 you may be experiencing this error because your architecture has armv7. Remove armv7 from the "Architectures" and "Valid Architectures" and this error should go away.
If you are using Xcode 3.2.5 you may be experiencing this error because your architecture has armv7. Remove armv7 from the "Architectures" and "Valid Architectures" and this error should go away.
Saturday, November 5, 2011
Xcode 4 and Xcode 3 compiler differences
The default compiler in Xcode 4 is LLVM GCC 4.2 while the default compiler in Xcode 3 is GCC 4.2. Why the difference? LLVM is supposedly faster than GCC and LLVM GCC has the benefits of LLVM and still compatible with GCC. See more at this great article:
http://useyourloaf.com/blog/2011/3/21/compiler-options-in-xcode-gcc-or-llvm.html
http://useyourloaf.com/blog/2011/3/21/compiler-options-in-xcode-gcc-or-llvm.html
Friday, September 16, 2011
-libxml2 Library not found
One of the 3rd party solutions we have says to add -libxml2 linker flag, but this causes an error when trying to build with xcode. Googling this error results in someone with a similar problem. He fixed it by reverting his project file. His linker flags show -lxml2 instad of -libxml2. Using -lxml2 works.
http://stackoverflow.com/questions/6173766/iphone-libxml2-not-found-during-build
http://stackoverflow.com/questions/6173766/iphone-libxml2-not-found-during-build
Tuesday, April 19, 2011
What is NoThumb in Google Analytics?
Basically, Thumb is an instruction set. Similar to how ARM is an instruction set. In the iOS programming guide it says:
“iPhones and iPod touches support two instruction sets, ARM and Thumb. Xcode uses Thumb instructions by default because using Thumb typically reduces code size by about 35 percent relative to ARM.
Applications that have extensive floating point code might perform better if they use ARM instructions rather than Thumb. You can turn off Thumb for your application by turning off the Compile for Thumb build setting.”
Some frameworks require that you use ARM so this is why the NoThumb version of Google Analytics was in high demand. (An example of this is: http://www.cocos2d-iphone.org/archives/26)
“iPhones and iPod touches support two instruction sets, ARM and Thumb. Xcode uses Thumb instructions by default because using Thumb typically reduces code size by about 35 percent relative to ARM.
Applications that have extensive floating point code might perform better if they use ARM instructions rather than Thumb. You can turn off Thumb for your application by turning off the Compile for Thumb build setting.”
Some frameworks require that you use ARM so this is why the NoThumb version of Google Analytics was in high demand. (An example of this is: http://www.cocos2d-iphone.org/archives/26)
Friday, May 28, 2010
'TheClassName' may not respond to '-methodName:forKey:withType'
// file.m
- (void)methodName:(id)value forKey:(NSString*)key {
[self methodName:value forKey:key withType:A_TYPE];
}
- (void)methodName:(id)value forKey:(NSString*)key withType:(TYPES)type {
....
}
The above lines will show a warning similar to 'TheClassName' may not respond to '-methodName:forkey:withType'. This is because of the order that the methods are written. When the compiler encounters the first method it flags it because the second method has not yet been defined. Reorder the methods to avoid this annoying warning.
Another reason this warning message might show is because the method actually is not defined or cannot be found in the interface file. I had the above method declared in a protocol, not the actual interface file. I imported the protocol, but forgot to tell the class to use the protocol ( i didn't say "@interface TheClassName <TheProtocolName> "). I found this out by doing a right-click -> Jump to Definition. And it gave me two options (one in the protocol and one in the class) instead of just going to the Protocol's declaration.
Subscribe to:
Posts (Atom)