Okay, after getting fed up trying to 'fix' a randomish error that was related to garbage collection of strings (and other bits), I decided to convert my WIP game from Tier 1 to Tier 2. (I know it was in the garbage collection because the Xcode output pointed directly into the interpreter.cpp file or to assembly language version of cFile.cpp and complained about trying to release memory that wasn't allocated.)
I have been assured that I would be able to build my Tier 2 app in Xcode and cygwin for the appropriate platforms. So, I bit the bullet so that I would have better control.
I am 90% done with the conversion and wanted to test a bit in Xcode.
My VS2010 project builds and the stubbed app (it doesn't call all the actual startup functions, yet) worked fine.
When I made an iOS project for an Xcode 4 AppGameKit template (that does compile and run) and added all my header/code files, the compile would not work. And it wasn't in any of my files.
These are the first set of errors (of 78 before it stopped compiling because of too many errors):
In file included from /Users/greeneyes/AGK/IDE/templates/get_yeeyee_home/accelerometer.cpp:2:
In file included from /Users/greeneyes/AGK/IDE/templates/get_yeeyee_home/accelerometer.h:5:
In file included from /Users/greeneyes/AGK/IDE/templates/get_yeeyee_home/common_functions.h:5:
In file included from /Users/greeneyes/AGK/IDE/templates/get_yeeyee_home/../../common/Include/AGK.h:6:
In file included from /Users/greeneyes/AGK/IDE/templates/get_yeeyee_home/../../common/Include/Common.h:142:
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS5.1.sdk/System/Library/Frameworks/Foundation.framework/Headers/Foundation.h:8:
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS5.1.sdk/System/Library/Frameworks/Foundation.framework/Headers/NSObjCRuntime.h:311:1: error: expected unqualified-id
@class NSString, Protocol;
^
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS5.1.sdk/System/Library/Frameworks/Foundation.framework/Headers/NSObjCRuntime.h:313:19: error: unknown type name 'NSString'
FOUNDATION_EXPORT NSString *NSStringFromSelector(SEL aSelector);
^
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS5.1.sdk/System/Library/Frameworks/Foundation.framework/Headers/NSObjCRuntime.h:314:44: error: use of undeclared identifier 'NSString'
FOUNDATION_EXPORT SEL NSSelectorFromString(NSString *aSelectorName);
^
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS5.1.sdk/System/Library/Frameworks/Foundation.framework/Headers/NSObjCRuntime.h:314:54: error: use of undeclared identifier 'aSelectorName'
FOUNDATION_EXPORT SEL NSSelectorFromString(NSString *aSelectorName);
^
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS5.1.sdk/System/Library/Frameworks/Foundation.framework/Headers/NSObjCRuntime.h:316:19: error: unknown type name 'NSString'
FOUNDATION_EXPORT NSString *NSStringFromClass(Class aClass);
^
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS5.1.sdk/System/Library/Frameworks/Foundation.framework/Headers/NSObjCRuntime.h:317:43: error: use of undeclared identifier 'NSString'
FOUNDATION_EXPORT Class NSClassFromString(NSString *aClassName);
^
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS5.1.sdk/System/Library/Frameworks/Foundation.framework/Headers/NSObjCRuntime.h:317:53: error: use of undeclared identifier 'aClassName'
FOUNDATION_EXPORT Class NSClassFromString(NSString *aClassName);
^
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS5.1.sdk/System/Library/Frameworks/Foundation.framework/Headers/NSObjCRuntime.h:319:19: error: unknown type name 'NSString'
FOUNDATION_EXPORT NSString *NSStringFromProtocol(Protocol *proto) NS_AVAILABLE(10_5, 2_0);
^
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS5.1.sdk/System/Library/Frameworks/Foundation.framework/Headers/NSObjCRuntime.h:319:50: error: use of undeclared identifier 'Protocol'
FOUNDATION_EXPORT NSString *NSStringFromProtocol(Protocol *proto) NS_AVAILABLE(10_5, 2_0);
^
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS5.1.sdk/System/Library/Frameworks/Foundation.framework/Headers/NSObjCRuntime.h:319:60: error: use of undeclared identifier 'proto'
FOUNDATION_EXPORT NSString *NSStringFromProtocol(Protocol *proto) NS_AVAILABLE(10_5, 2_0);
^
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS5.1.sdk/System/Library/Frameworks/Foundation.framework/Headers/NSObjCRuntime.h:320:19: error: unknown type name 'Protocol'
FOUNDATION_EXPORT Protocol *NSProtocolFromString(NSString *namestr) NS_AVAILABLE(10_5, 2_0);
^
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS5.1.sdk/System/Library/Frameworks/Foundation.framework/Headers/NSObjCRuntime.h:320:50: error: use of undeclared identifier 'NSString'
FOUNDATION_EXPORT Protocol *NSProtocolFromString(NSString *namestr) NS_AVAILABLE(10_5, 2_0);
^
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS5.1.sdk/System/Library/Frameworks/Foundation.framework/Headers/NSObjCRuntime.h:320:60: error: use of undeclared identifier 'namestr'
FOUNDATION_EXPORT Protocol *NSProtocolFromString(NSString *namestr) NS_AVAILABLE(10_5, 2_0);
^
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS5.1.sdk/System/Library/Frameworks/Foundation.framework/Headers/NSObjCRuntime.h:324:30: error: use of undeclared identifier 'NSString'
FOUNDATION_EXPORT void NSLog(NSString *format, ...) NS_FORMAT_FUNCTION(1,2);
^
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS5.1.sdk/System/Library/Frameworks/Foundation.framework/Headers/NSObjCRuntime.h:324:40: error: use of undeclared identifier 'format'; did you mean 'normal'?
FOUNDATION_EXPORT void NSLog(NSString *format, ...) NS_FORMAT_FUNCTION(1,2);
^~~~~~
normal
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS5.1.sdk/usr/include/MacTypes.h:547:3: note: 'normal' declared here
normal = 0,
^
In file included from /Users/greeneyes/AGK/IDE/templates/get_yeeyee_home/accelerometer.cpp:2:
In file included from /Users/greeneyes/AGK/IDE/templates/get_yeeyee_home/accelerometer.h:5:
In file included from /Users/greeneyes/AGK/IDE/templates/get_yeeyee_home/common_functions.h:5:
In file included from /Users/greeneyes/AGK/IDE/templates/get_yeeyee_home/../../common/Include/AGK.h:6:
In file included from /Users/greeneyes/AGK/IDE/templates/get_yeeyee_home/../../common/Include/Common.h:142:
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS5.1.sdk/System/Library/Frameworks/Foundation.framework/Headers/Foundation.h:8:
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS5.1.sdk/System/Library/Frameworks/Foundation.framework/Headers/NSObjCRuntime.h:324:52: error: expected ';' after top level declarator
FOUNDATION_EXPORT void NSLog(NSString *format, ...) NS_FORMAT_FUNCTION(1,2);
^
;
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS5.1.sdk/System/Library/Frameworks/Foundation.framework/Headers/NSObjCRuntime.h:325:31: error: use of undeclared identifier 'NSString'
FOUNDATION_EXPORT void NSLogv(NSString *format, va_list args) NS_FORMAT_FUNCTION(1,0);
^
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS5.1.sdk/System/Library/Frameworks/Foundation.framework/Headers/NSObjCRuntime.h:325:41: error: use of undeclared identifier 'format'; did you mean 'normal'?
FOUNDATION_EXPORT void NSLogv(NSString *format, va_list args) NS_FORMAT_FUNCTION(1,0);
^~~~~~
normal
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS5.1.sdk/usr/include/MacTypes.h:547:3: note: 'normal' declared here
normal = 0,
^
In file included from /Users/greeneyes/AGK/IDE/templates/get_yeeyee_home/accelerometer.cpp:2:
In file included from /Users/greeneyes/AGK/IDE/templates/get_yeeyee_home/accelerometer.h:5:
In file included from /Users/greeneyes/AGK/IDE/templates/get_yeeyee_home/common_functions.h:5:
In file included from /Users/greeneyes/AGK/IDE/templates/get_yeeyee_home/../../common/Include/AGK.h:6:
In file included from /Users/greeneyes/AGK/IDE/templates/get_yeeyee_home/../../common/Include/Common.h:142:
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS5.1.sdk/System/Library/Frameworks/Foundation.framework/Headers/Foundation.h:8:
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS5.1.sdk/System/Library/Frameworks/Foundation.framework/Headers/NSObjCRuntime.h:325:62: error: expected ';' after top level declarator
FOUNDATION_EXPORT void NSLogv(NSString *format, va_list args) NS_FORMAT_FUNCTION(1,0);
^
;
fatal error: too many errors emitted, stopping now [-ferror-limit=]
20 errors generated.
These lines had a total of 52 errors flagged, mostly 'Unknown type' and 'Use of an undeclared identifier' caused because the compiler didn't like the first line shown here:
@class NSString, Protocol;
FOUNDATION_EXPORT NSString *NSStringFromSelector(SEL aSelector);
FOUNDATION_EXPORT SEL NSSelectorFromString(NSString *aSelectorName);
FOUNDATION_EXPORT NSString *NSStringFromClass(Class aClass);
FOUNDATION_EXPORT Class NSClassFromString(NSString *aClassName);
FOUNDATION_EXPORT NSString *NSStringFromProtocol(Protocol *proto) NS_AVAILABLE(10_5, 2_0);
FOUNDATION_EXPORT Protocol *NSProtocolFromString(NSString *namestr) NS_AVAILABLE(10_5, 2_0);
Yes, the problem is occurring in an Xcode sdk.
Has anyone run into this and do you know how to fix it?
Very frustrated.
I'm going to go see what happens when I try to do an Android build in cygwin/Eclipse.
Cheers,
Ancient Lady
AGK Community Tester