Open GoogleCodeExporter opened 9 years ago
I think this should be a high priority. The code simply does not compile with
Xcode 4.2 - iOS 5 GM.
Original comment by hoc...@gmail.com
on 6 Oct 2011 at 4:46
If you can figure out what's up, i'm happy to try to fix things. As it is, my
macbook is currently broken and needs to be repaired, so it will be a while
before i can get around to this. Cheers!
Original comment by cyrus.na...@gmail.com
on 6 Oct 2011 at 7:50
Xcode 4.2 uses LLVM 3.0 as the default compiler. And it seems that the default
configuration treats some issues detected by the static analyzer as
compile-time errors instead of warnings.
Here is a diff to fix the semantic issues:
Index: objectivec/Classes/ConcreteExtensionField.m
===================================================================
--- objectivec/Classes/ConcreteExtensionField.m (revision 4426)
+++ objectivec/Classes/ConcreteExtensionField.m (working copy)
@@ -15,14 +15,14 @@
#import "ConcreteExtensionField.h"
@interface PBConcreteExtensionField()
-@property PBExtensionType type;
-@property Class extendedClass;
-@property int32_t fieldNumber;
+@property (assign) PBExtensionType type;
+@property (assign) Class extendedClass;
+@property (assign) int32_t fieldNumber;
@property (retain) id defaultValue;
-@property Class messageOrGroupClass;
-@property BOOL isRepeated;
-@property BOOL isPacked;
-@property BOOL isMessageSetWireFormat;
+@property (assign) Class messageOrGroupClass;
+@property (assign) BOOL isRepeated;
+@property (assign) BOOL isPacked;
+@property (assign) BOOL isMessageSetWireFormat;
@end
@implementation PBConcreteExtensionField
@@ -149,6 +149,8 @@
case PBExtensionTypeSFixed64:
case PBExtensionTypeDouble:
return 8;
+ default:
+ break;
}
@throw [NSException exceptionWithName:@"InternalError" reason:@"" userInfo:nil];
@@ -490,14 +492,14 @@
case PBExtensionTypeEnum: return [NSNumber numberWithInt:[input readEnum]];
case PBExtensionTypeGroup:
{
- id<PBMessage_Builder> builder = [messageOrGroupClass builder];
+ id<PBMessage_Builder> builder =
(id<PBMessage_Builder>)[messageOrGroupClass builder];
[input readGroup:fieldNumber builder:builder extensionRegistry:extensionRegistry];
return [builder build];
}
case PBExtensionTypeMessage:
{
- id<PBMessage_Builder> builder = [messageOrGroupClass builder];
+ id<PBMessage_Builder> builder =
(id<PBMessage_Builder>)[messageOrGroupClass builder];
[input readMessage:builder extensionRegistry:extensionRegistry];
return [builder build];
}
Original comment by klaz...@gmail.com
on 10 Oct 2011 at 5:56
I had the same issue. I found that it was caused by the "Treat Warnings as
Errors" flag being set. I don't like switching it, but there was no other way
around it for me yet.
Original comment by swgil...@gmail.com
on 21 Nov 2011 at 11:24
Just to follow up, I have fixed this without needing my previous solution
(changing warnings as errors).
What it was the default compiler was set to Apple LLVM GCC 4.2. Switching it to
LLVM GCC 4.2 cleared up my errors I was getting.
Original comment by swgil...@gmail.com
on 25 Nov 2011 at 11:49
I had the same issues, I did what you said but I keep getting two erros:
Undefined symbols for architecture i386:
"_OBJC_CLASS_$_AreaRequest_Builder", referenced from:
objc-class-ref in ViewController.o
ld: symbol(s) not found for architecture i386
clang: error: linker command failed with exit code 1 (use -v to see invocation)
and:
error: unable to open executable
'/Users/fmota/Library/Developer/Xcode/DerivedData/PB_final-ehnvnttzdrnixobwoovtt
uyvwdby/Build/Products/Debug-iphonesimulator/PB_final.app/PB_final'
Any ideas or tips you can give me?
Original comment by filipeta...@gmail.com
on 6 Jan 2012 at 3:22
i get the same error at the end.
could it be a problem with arc? because it is not compiled for arc?
Original comment by hasan.gu...@gmail.com
on 21 Feb 2012 at 7:21
Original issue reported on code.google.com by
hoc...@gmail.com
on 5 Oct 2011 at 7:06