UIInterfaceOrientationMask... was not declared
Monkey Targets Forums/iOS/UIInterfaceOrientationMask... was not declared
| ||
I'm trying to use Monkey (newest version MonkeyPro66) on a Mac for the first time (OS X 10.6.8, XCode 3.2.6) and can't get any of the examples to compile to target iOS. Any ideas? - - - - - "/Users/mike/monkey/bin/trans_macos" -target=ios -config=Debug -run "/Users/mike/monkey/bananas/mak/mojotest/mojotest.monkey" TRANS monkey compiler V1.42 Parsing... Semanting... Translating... Building... Build settings from command line: PLATFORM_NAME = iphonesimulator SDKROOT = /Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator4.3.sdk === BUILD NATIVE TARGET MonkeyGame OF PROJECT MonkeyGame WITH CONFIGURATION Debug === Check dependencies CpResource build/Debug-iphonesimulator/MonkeyGame.app/data data cd /Users/mike/monkey/bananas/mak/mojotest/mojotest.build/ios setenv PATH "/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin:/Developer/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin" /Developer/Library/PrivateFrameworks/DevToolsCore.framework/Resources/pbxcp -exclude .DS_Store -exclude CVS -exclude .svn -exclude .git -resolve-src-symlinks /Users/mike/monkey/bananas/mak/mojotest/mojotest.build/ios/data /Users/mike/monkey/bananas/mak/mojotest/mojotest.build/ios/build/Debug-iphonesimulator/MonkeyGame.app CompileC build/MonkeyGame.build/Debug-iphonesimulator/MonkeyGame.build/Objects-normal/i386/main.o main.mm normal i386 objective-c++ com.apple.compilers.gcc.4_2 cd /Users/mike/monkey/bananas/mak/mojotest/mojotest.build/ios setenv LANG en_US.US-ASCII setenv PATH "/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin:/Developer/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin" /Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin/gcc-4.2 -x objective-c++ -arch i386 -fmessage-length=0 -pipe -Wno-trigraphs -fpascal-strings -fasm-blocks -O0 -Wreturn-type -Wunused-variable -isysroot /Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator4.3.sdk -fexceptions -fvisibility=hidden -fvisibility-inlines-hidden -mmacosx-version-min=10.6 -gdwarf-2 -fobjc-abi-version=2 -fobjc-legacy-dispatch -D__IPHONE_OS_VERSION_MIN_REQUIRED=30000 -iquote /Users/mike/monkey/bananas/mak/mojotest/mojotest.build/ios/build/MonkeyGame.build/Debug-iphonesimulator/MonkeyGame.build/MonkeyGame-generated-files.hmap -I/Users/mike/monkey/bananas/mak/mojotest/mojotest.build/ios/build/MonkeyGame.build/Debug-iphonesimulator/MonkeyGame.build/MonkeyGame-own-target-headers.hmap -I/Users/mike/monkey/bananas/mak/mojotest/mojotest.build/ios/build/MonkeyGame.build/Debug-iphonesimulator/MonkeyGame.build/MonkeyGame-all-target-headers.hmap -iquote /Users/mike/monkey/bananas/mak/mojotest/mojotest.build/ios/build/MonkeyGame.build/Debug-iphonesimulator/MonkeyGame.build/MonkeyGame-project-headers.hmap -F/Users/mike/monkey/bananas/mak/mojotest/mojotest.build/ios/build/Debug-iphonesimulator -I/Users/mike/monkey/bananas/mak/mojotest/mojotest.build/ios/build/Debug-iphonesimulator/include -I/Users/mike/monkey/bananas/mak/mojotest/mojotest.build/ios/build/MonkeyGame.build/Debug-iphonesimulator/MonkeyGame.build/DerivedSources/i386 -I/Users/mike/monkey/bananas/mak/mojotest/mojotest.build/ios/build/MonkeyGame.build/Debug-iphonesimulator/MonkeyGame.build/DerivedSources -include /var/folders/mo/moKvC+VMFteMYfjpNMxzwk+++TM/-Caches-/com.apple.Xcode.502/SharedPrecompiledHeaders/MonkeyGame_Prefix-camftjqznkzbvnbjyxvgkalyxfej/MonkeyGame_Prefix.pch -c /Users/mike/monkey/bananas/mak/mojotest/mojotest.build/ios/main.mm -o /Users/mike/monkey/bananas/mak/mojotest/mojotest.build/ios/build/MonkeyGame.build/Debug-iphonesimulator/MonkeyGame.build/Objects-normal/i386/main.o /Users/mike/monkey/bananas/mak/mojotest/mojotest.build/ios/main.mm: In function 'NSUInteger -[MonkeyViewController supportedInterfaceOrientations](MonkeyViewController*, objc_selector*)': /Users/mike/monkey/bananas/mak/mojotest/mojotest.build/ios/main.mm:225: error: 'UIInterfaceOrientationMaskPortrait' was not declared in this scope /Users/mike/monkey/bananas/mak/mojotest/mojotest.build/ios/main.mm:226: error: 'UIInterfaceOrientationMaskPortraitUpsideDown' was not declared in this scope /Users/mike/monkey/bananas/mak/mojotest/mojotest.build/ios/main.mm:227: error: 'UIInterfaceOrientationMaskLandscapeLeft' was not declared in this scope /Users/mike/monkey/bananas/mak/mojotest/mojotest.build/ios/main.mm:228: error: 'UIInterfaceOrientationMaskLandscapeRight' was not declared in this scope ** BUILD FAILED ** The following build commands failed: MonkeyGame: CompileC build/MonkeyGame.build/Debug-iphonesimulator/MonkeyGame.build/Objects-normal/i386/main.o /Users/mike/monkey/bananas/mak/mojotest/mojotest.build/ios/main.mm normal i386 objective-c++ com.apple.compilers.gcc.4_2 (1 failure) TRANS FAILED: TRANS Failed to execute 'xcodebuild -configuration Debug -sdk iphonesimulator', return code=256 Done. |
| ||
I am also on older xcode and had to comment out those lines in my project for it to compile:-(NSUInteger)supportedInterfaceOrientations{ CFArrayRef array=(CFArrayRef)CFBundleGetValueForInfoDictionaryKey( CFBundleGetMainBundle(),CFSTR("UISupportedInterfaceOrientations") ); if( !array ) return 0; CFRange range={ 0,CFArrayGetCount( array ) }; NSUInteger mask=1; //simon was here // if( CFArrayContainsValue( array,range, ) ) mask|=UIInterfaceOrientationMaskPortrait; // if( CFArrayContainsValue( array,range,CFSTR("UIInterfaceOrientationPortraitUpsideDown") ) ) mask|=UIInterfaceOrientationMaskPortraitUpsideDown; // if( CFArrayContainsValue( array,range,CFSTR("UIInterfaceOrientationLandscapeLeft") ) ) mask|=UIInterfaceOrientationMaskLandscapeLeft; // if( CFArrayContainsValue( array,range,CFSTR("UIInterfaceOrientationLandscapeRight") ) ) mask|=UIInterfaceOrientationMaskLandscapeRight; return mask; } If you alter the code in targets/ios/main.mm you will need to remove any .build folders that have been created already so that monkey generates new code with the change. |
| ||
Thanks skid, now it works! I do hope that Monkey will keep working with older versions of xcode. |
| ||
While it might work with it, to my knowledge you need to update XCode anyway when you wanna publish it. The newest Icon requirements force you to do so. |
| ||
Which version do you need for those newest icon requirements? In the mean time, I bought a developers license and was now able to update xcode to 4.2 (the newest that runs on OSX 10.6.8) and I still get the same errors as above (which I could solve in the same way). I can't update to Mountain Lion, since it says that my computer is not compatible (Macmini1,1). |
| ||
from what i got told, you need the newest xcode version but they could be wrong. |
| ||
I have Xcode 4.4. Same errors here. |
| ||
Seems to work with xcode 4.5.2 |