Game Development Community

iPhone 3.0 OS compatibiliy

by BeyondtheTech · in iTorque 2D · 05/02/2009 (6:14 am) · 35 replies

Has anyone tested their iTGB-built games on an iPhone running any iteration of the OS 3.0 beta that's out for us developers?

I don't know if this is premature to ask, but will iTGB support or take advantage of any of the new features of the OS 3.0, or is iTGB primarily independent of what the OS does?
Page«First 1 2 Next»
#21
05/09/2009 (12:08 pm)
I'm going to just keep plugging away at these errors, but I'm anticipating these changes are going to bork badly during linking. So I will not post anything else until I get a successful compile.
#22
05/09/2009 (12:24 pm)
Finally down to 12 errors:

codeBlock.h, line 93:

Original Code:
bool CodeBlock::compileToStream( Stream *st, StringTableEntry fileName, const char *string );

Fixed Code:
bool compileToStream( Stream *st, StringTableEntry fileName, const char *string );

t2dSceneObject.h, line 342:

Original Code:
char* t2dSceneObject::getAllLinkpointIDs( void );

Fixed Code:
char* getAllLinkpointIDs( void );


t2dShapeVector.h, line 54

Original Code:
const char* t2dShapeVector::getPoly( void );
bool t2dShapeVector::getFillMode( void );
const char* t2dShapeVector::getLineColor( void );
const char* t2dShapeVector::getFillColor( void );

Fixed Code:
const char* getPoly( void );
bool getFillMode( void );
const char* getLineColor( void );
const char* getFillColor( void );


The remaining 12 have to do with the very annoying SoundEngine error, as discussed here: http://www.iphonedevsdk.com/forum/iphone-sdk-development-iphone-os-3-0/13645-3-0-breaks-soundengine-cpp.html

Very happy this is an iPhone SDK problem, and not iTGB. Gotta make those changes now.
#23
05/09/2009 (12:28 pm)
0 errors...linking...wow...

iTGB is now compatible and compiling with iPhone SDK 3.0. First run on the Simulator works beautifully. Time to test on device...fingers crossed
#24
05/09/2009 (12:31 pm)
Now, if someone is feeling brave, could you apply those code changes I've posted to iTGB 1.2 with the 2.2.1 SDK? I want to make sure current builds do not break under these modifications.
#25
05/09/2009 (12:40 pm)
GCC version warning:
devforums.apple.com/thread/15326?tstart=15

Seems like we're supposed to use GCC 4.2!

I'm trying your changes now, with all GCC variants possible.
#26
05/09/2009 (12:42 pm)
Ugh...switching to 4.2 now. >_< errors

ld: library not found for -lstdc++-static
#27
05/09/2009 (12:58 pm)
Target: Debug iTGB, device, with all changes mentioned so far.

Xcode 3.1.2, GCC 4.0, against 2.2.1: Compiles.
Xcode 3.1.2, GCC 4.2, against 2.2.1: Does not exist; skipped.

Xcode 3.1.3, GCC 4.0, against 2.2.1: Compiles.
Xcode 3.1.3, GCC 4.2, against 2.2.1: Over 10000 errrors.
Xcode 3.1.3, GCC 4.2, against 3.0: 12 errors.

I noticed that the system version of GCC is 4.0 in 3.1.2, and 4.2 in 3.1.3.
#28
05/09/2009 (1:00 pm)
Oh wow, entry #4 not good...Can you post the error messages, the ones that repeat the most that is.
#29
05/09/2009 (1:05 pm)
Typical errors:
error: stdint.h: No such file or directory
error: float.h: No such file or directory

Namespace issue? Xcode hates me? Compiler needs more flags?
#30
11/28/2009 (2:23 pm)
Re: ld: library not found for -lstdc++-static (shows when compiling for iPhone 3.0/3.1+ in release) - M. Perry's post 05/09/2009 (11:42 am)

ANSWER: After a lot of digging, I have figured out that the static stdc++ libraries are no longer found in the 3.0 SDK - you can get around this by copying them from 2.2.1 or switching to Dynamic but I can see even in a compile for Mac there is a framerate hit from dynamic and don't know if you can do this for iPhone distro.

#31
11/28/2009 (2:32 pm)
stackoverflow.com/questions/1095145/linking-static-libraries-in-iphone-sdk-3-0

confirmed this static library problem is an issue with 3.0 SDK Apple has shipped, adjusting library path to use the 2.2 version appears to be a common fix (which requires both the 2.2.x SDK and 3.0 SDK to be installed on the same platform obviously). Strongly suggest this be made into a point-form list for a sticked "how to build" thread.
#32
11/28/2009 (6:06 pm)
2.2.1 + GCC 4.2 will not work

GCC 4.2 is for 3.0+
for 2.x you need GCC 4.0 or it will fail.
(the newer XCode versions change this automatically when you change the base sdk in the project settings)

What you compile for in the drop down is of no interest here by the way, the base sdk in the project settings is the only thing thats of interest when it comes to the GCC version.
#33
11/29/2009 (4:50 pm)
Note on use of static - that is how 1.3 Beta iTGB creates the project and this issue is introduced by the iTGB product when release mode is specified. It definitely DOES matter what you are selecting when building in iTGB - though not due to the GCC. The reason it matters is that this static linkage specification doesn't occur when you select a DEBUG build, this comes up only when RELEASE is selected (a common optimization for speed is to eliminate the overhead by collapsing in the code).

If dynamic is vetted as correct and performance validated, the 1.3 product should generate XCode make files with dynamic linkage of the std c++ libs specified. That is not a user issue, that is a defect which until my post has not had a workaround listed in the forums over a period of nearly half a year.

A manual workaround (not a fix) is to right-click on the Target iTGB (and iTGB_Script_Optimize), scroll down to / Linking, click C++ Standard Library Type, change this to Dynamic.

Alternatively, the setenv PATH should include the 2.2.1 sdk in secondary priority to pick up the 2.2.1 static library however this has the aforementioned issue that gcc 4.2 will not work with the 2.2.1 SDK (though you can do this and set the C/C++ Compiler Version to GCC 4.0).
#34
11/29/2009 (8:14 pm)
Just use the latest SDK. Compiling with GCC 4.0 works on that (for those who want to release for 2.x devices). Use 4.0 on SDK 2.x in any case, as there are most likely a ton of changes in the compiler in those two (major!) revisions.
Page«First 1 2 Next»