iTGB 1.4 Compiler errors
by Gavin Beard · in iTorque 2D · 01/25/2011 (3:49 pm) · 11 replies
Hi All,
I have recently purchased iTGB and am attempting to compile a basic, default project. I followed the information here :http://www.garagegames.com/community/resources/view/19979 to update the project and remove the Base SDK Missing error, and had to remove or update a few misplaced files.
I thought all was going well when I banished the sdk error, but upon compiling I am greeted by 33 Errors and 2 warnings. The errors are things like "Expected ) before ( token" and i dont know how to get rid of them.
I've attached a screen shot to show some of the errors
any help appreciated.

gav
I have recently purchased iTGB and am attempting to compile a basic, default project. I followed the information here :http://www.garagegames.com/community/resources/view/19979 to update the project and remove the Base SDK Missing error, and had to remove or update a few misplaced files.
I thought all was going well when I banished the sdk error, but upon compiling I am greeted by 33 Errors and 2 warnings. The errors are things like "Expected ) before ( token" and i dont know how to get rid of them.
I've attached a screen shot to show some of the errors
any help appreciated.

gav
#2
01/26/2011 (12:32 am)
I have checked that and the MediaPlayer framework was red. I removed and readded ALL frameworks, just to be on the safe side, but the error appears to be within the UIKit. It's very strange and I'm bashing my head against the wall :)
#3
01/26/2011 (4:08 am)
(Usually this happens when you are using an older GCC version. Have you tried changing the GCC version to 4.2? If all fails, try re-downloading the latest Xcode and see how it goes.
#4
It's very strange issue. iTGB is the only issue I get compiling, the non game apps I have written, and the few projects I have written in cocos2d all work without error. I am going to hopefully format my mac tonight and start from scratch so I guess I will see how it goes after that.
Thanks Aun, helpful as ever
01/26/2011 (4:16 am)
Yeah, using GCC 4.2 (tried the 3 different GCC options I have).It's very strange issue. iTGB is the only issue I get compiling, the non game apps I have written, and the few projects I have written in cocos2d all work without error. I am going to hopefully format my mac tonight and start from scratch so I guess I will see how it goes after that.
Thanks Aun, helpful as ever
#5
What method do you use to add frameworks? There's an old way and a functioning way.
01/26/2011 (4:25 am)
Don't reformat just over that. Xcode reinstallation (non-beta!) after uninstalling it properly should help, though.What method do you use to add frameworks? There's an old way and a functioning way.
#6
I wasn't going to format just for this issue. My main HDD in my Macbook Pro just seems to be running out of space quick, and its all getting a little sluggish.
I add the Frameworks by right clicking on the Framework folder and 'Add existing framework' then just pick one from the list. Is there a different way to do it (I know its a bit different using the newest beta xcode)
Gav
01/26/2011 (4:54 am)
Thanks for the comments Ronny.I wasn't going to format just for this issue. My main HDD in my Macbook Pro just seems to be running out of space quick, and its all getting a little sluggish.
I add the Frameworks by right clicking on the Framework folder and 'Add existing framework' then just pick one from the list. Is there a different way to do it (I know its a bit different using the newest beta xcode)
Gav
#7
Sluggishness could solve itself then. But have Onyx clean up some logs etc. Sometimes there is a giant DB file related to an index operation in /var/log/.
The other way to add frameworks is to click your target, Get Info and go to the leftmost tab. There is your framework/dylib adding tool, all picked from the current framework's list. Adding existing is generally for custom frameworks quickly. Although drag and drop is faster.
01/26/2011 (5:33 am)
Space: I've got Clusters (was free via MacHeist, but somewhat cheap). Pick some directories with files that compress well, and you'll have the gigs ready again :)Sluggishness could solve itself then. But have Onyx clean up some logs etc. Sometimes there is a giant DB file related to an index operation in /var/log/.
The other way to add frameworks is to click your target, Get Info and go to the leftmost tab. There is your framework/dylib adding tool, all picked from the current framework's list. Adding existing is generally for custom frameworks quickly. Although drag and drop is faster.
#8
Another reason for a reformat is that my Windows Installation and bootcamp seem to have developed alot of issues, and there are few smaller partitions used for backups etc that I want to incorperate back into the normal space allocation of the osx and windows installation :S
01/26/2011 (6:06 am)
Clusters does sound very good. In my laptop I have alot of data that used to be on an external drive that went a bit screwy. i've just got a new external 500gb drive that I've picked up today for £30 so am going to get as much as I can onto that. I'm sure there are alot of apps etc that I just dont know about that I've not even looked for yet, no need to find those as well.Another reason for a reformat is that my Windows Installation and bootcamp seem to have developed alot of issues, and there are few smaller partitions used for backups etc that I want to incorperate back into the normal space allocation of the osx and windows installation :S
#9
01/26/2011 (8:37 am)
I've been getting the same exact 33 errors as well. I did a complete xcode uninstall and reinstall. Reattached all the frameworks. The project settings look fine.
#10
I had changed most settings but forgot one thing (my bad :( )
in XCode, in the left hand Under "Groups and Files" go into Targets, right click on the ITorque2dGame_Sim target and then "get info" and make sure you change the compiler here to GCC 4.2 (it'll be at GCC 4.0)
It seems that editing the main project settings and changing the compiler is not enough, but I guess more of a XCode issue rather than Torque.
Now I get 382 errors about "GL_UNSIGNED_SHORT_1_5_5_5_REV" redefined
01/26/2011 (11:15 am)
I have gotten rid of the errors :)I had changed most settings but forgot one thing (my bad :( )
in XCode, in the left hand Under "Groups and Files" go into Targets, right click on the ITorque2dGame_Sim target and then "get info" and make sure you change the compiler here to GCC 4.2 (it'll be at GCC 4.0)
It seems that editing the main project settings and changing the compiler is not enough, but I guess more of a XCode issue rather than Torque.
Now I get 382 errors about "GL_UNSIGNED_SHORT_1_5_5_5_REV" redefined
#11
I realized that when i Select GCC 4.2, the XCODE never compiler with gcc4.2, and always compiler with gcc4.0.
For you fix the problem, follow these steps
1) First open you XCODE Project iT2D
2) Go to TARGET, and double click in iTorque2DGame_device
3) In TAB Builder, find the "C/C++ Compiler Version"
4) Now, YOU CANT SELECT GCC 4.2, you NEED click in OTHER, or double click, and you write 4.2
5) After this, repet this steps for iTorque2DGame_sim
6) After you need repet this stes for XCODE Project Target(iTorque2D Project)
This work fine to me, i hope this fine for you. If not work, please see output problem, and get details, check that copiler is gcc4.0, and not gcc4.0
Good Luck!!
02/04/2011 (1:11 pm)
Hi, I FOUND THE SOLUTION for me, i think that is bug of XCODE.I realized that when i Select GCC 4.2, the XCODE never compiler with gcc4.2, and always compiler with gcc4.0.
For you fix the problem, follow these steps
1) First open you XCODE Project iT2D
2) Go to TARGET, and double click in iTorque2DGame_device
3) In TAB Builder, find the "C/C++ Compiler Version"
4) Now, YOU CANT SELECT GCC 4.2, you NEED click in OTHER, or double click, and you write 4.2
5) After this, repet this steps for iTorque2DGame_sim
6) After you need repet this stes for XCODE Project Target(iTorque2D Project)
This work fine to me, i hope this fine for you. If not work, please see output problem, and get details, check that copiler is gcc4.0, and not gcc4.0
Good Luck!!
Torque Owner Joe Williams
Newborn Games