Game Development Community

Xcode pointing errors due to unknow reason (setUsesPhysics involved)

by Mike Moore · in iTorque 2D · 06/04/2009 (2:53 pm) · 9 replies

Hello,

I´m at the point of don´t know what to do next to succesfully run the game on the iPhone and need help from the community/gg team to solve current strange issue.

The game is running well both in the iTGB editor and the simulator. The nightmare starts when trying to play it on the real hardware.

After include the setUsesPhysics() to true in all the moving elements of my game, a serie or errors are reported within Xcode compiler:

44 Errors of the following (all look to be pointing to the same line as well)

error: extra qualification't2dSceneObject::' on member 'getAlllinkpointIDs'

Line Location t2dSceneObject.h:342

I've then added the code where it points to and I've stuck -->>> <<<<-- on the lines as to where Xcode point to the error line.

-------------  CODE SNIPPIT ---------------------------

/// Mounting.

U32 addLinkPoint( const t2dVector& nodeOffset );

void removeLinkPoint( const U32 mountID );

bool setLinkPoint( const U32 mountID, const t2dVector& nodeOffset );

tMountNode* getMountNode( const U32 mountID );

S32 getMountNodeCount() const { return mMountNodes.size(); };

const tMountNode& getMountNodeByIndex(S32 index) const { return mMountNodes[index]; };

void removeAllLinkPoints( void );

->>>>>	char* t2dSceneObject::getAllLinkpointIDs( void );  <<<<<<<<<<<-

void getAllMountedChildren(Vector<t2dSceneObject *> *);

Has somebody idea on what to do next to figure this out?

Thanks

Mike


#1
06/05/2009 (6:56 am)
This only happens when building for iPhone OS 3.0 and it's because GCC 4.2 doesn't like the extra scope qualification in the header files.

You need to remove:
char* t2dSceneObject::getAllLinkpointIDs( void );

From all the header files it complains about. You see this a lot in header files when developers create functions in the .cpp file they need while writing another function and then cut and paste the definition into the .h file, which isn't suppose to have the <classname>:: prefix on the method name.
#2
06/05/2009 (8:03 am)
That is what I have confirmed. This happened to me when I was porting iTGB to 1.3. I spent a weekend posting updates as I went along and that caused the most errors. Try Bret's suggestion and let us know.
#3
06/05/2009 (9:05 am)
@Michael,

Don´t understand at all since I think iTGB 1.2 is not compatible with iPhone OS 3.0... I´m right? If so, this incompatibility will be causing all those errors?

The truth is that I´m more on the art side then programming... would you give some specific instructions to do what I must to do?

Thanks

Mike
#4
06/05/2009 (12:04 pm)
Compile it for OS 2.2.1 and you won't have these issues. You can do that if you don't want/can't fix these compile issues yourself.
#5
06/05/2009 (12:12 pm)
Hi Bret,
Thanks for your help. I've just tried that and it came back with a strange error saying with the following error:

"Error Starting Executable"
No provisioned iPhone OS device is connected.

Now I'm assuming that some how my iPod that I use for testing has got it's head up it's ass, so I'm re-installing the OS again now and trying again.

When I build for 2.2.1 I don't get any errors at all (a few warning, but that's all).

I'll let you know how I get on after the re-install finishes.

Thanks again,
Mike.
#6
06/05/2009 (5:26 pm)
If you have OS 3.0, you also need a part of the 3.0 SDK integrated with your 2.x SDK. There is a package inside the Packages directory of the 3.0 DMG which has the image file you need to be able to upload to a 3.0 device. You will probably guess which one it is when you see it (can't remember right now).

When you install that into the default location, Xcode 3.1.2 is able to talk to beta devices. Don't install the full 3.0 SDK just yet. I have a feeling a new one drops next week.
#7
06/06/2009 (1:18 am)
Hello guys,
Just want to say a BIG THANK YOU for all your help. I’ve finally got my game up and running on my test iPod and it appears to be working the way it should. It’s such a good buzz to be able to play your game on real hardware for the first time.
I left my iPod re-installing (I’ve got so much crap on my iPod (about 30Gigs worth) which just automatically starting to install it all back on again) tried building again to 2.21 and it worked a treat. No idea what caused it, but it’s working now =)

@Ronny:
Hi Ronny,
I’m just looking at the DMG Packages folder now (I’ve got both the OS 3 and 2.21 SDK’s installed) but I can’t see anything specific about OS3 that jumps out at me, but I’ll have a play later today to see if I can see anything.

Thanks again guys for all your help.

Mike.
#8
06/06/2009 (2:07 am)
Take a look in Platforms/iPhoneOS.platform/DeviceSupport/ for your beta kit. Link the directory for 3.0 from there to /Developer/Platforms/iPhoneOS.platform/DeviceSupport/, and your old Xcode should be able to upload just fine.
#9
06/07/2009 (3:44 am)
Thanks for the points Ronny, but at the moment I'm now getting the error message from Xcode (which comes up twice) when ever I try to build:

"Could not inspect the application package"

I've not touched anything since I got it working yesterday so I don't know what's causing it to happen, but I'm going to walk away from it for a couple of days or I am really going to beat the hell out of my MAC.
I've just tried re-installing the SDK just in case something has screwed up there, but didn't make any difference there. Even building to the simulator, it won't work (you get the iTGB logo and it kicks you out, back to the home page almost straight away).
I really need to start drinking again =?

Cheers,
Mike.