Apps do not compile correctly
by Ricky Hopper · in iTorque 2D · 10/20/2009 (5:21 pm) · 34 replies
Hey,
Whenever I try to compile an app to the Simulator, it brings up the loading screen, and then the logo just darkens and nothing happens after that. Does anyone know anything that would cause this?
Whenever I try to compile an app to the Simulator, it brings up the loading screen, and then the logo just darkens and nothing happens after that. Does anyone know anything that would cause this?
About the author
Recent Threads
#2
[Session started at 2009-10-20 16:40:26 -0400.]
Initial Command Line
0 : /Users/Ricky/Library/Application Support/iPhone Simulator/User/Applications/84CC5E84-B2D9-45AA-AA6C-38F212778C08/testGame.app/testGame
Merged Command Line
0 : /Users/Ricky/Library/Application Support/iPhone Simulator/User/Applications/84CC5E84-B2D9-45AA-AA6C-38F212778C08/testGame.app/testGame
performing mainInit()
It just doesn't do anything after the screen darkens up. I'm building it manually from xCode, using iTGB_Script Optimize, Simulator 3.0, and Release configuration.
10/20/2009 (5:46 pm)
Console output: [Session started at 2009-10-20 16:40:26 -0400.]
Initial Command Line
0 : /Users/Ricky/Library/Application Support/iPhone Simulator/User/Applications/84CC5E84-B2D9-45AA-AA6C-38F212778C08/testGame.app/testGame
Merged Command Line
0 : /Users/Ricky/Library/Application Support/iPhone Simulator/User/Applications/84CC5E84-B2D9-45AA-AA6C-38F212778C08/testGame.app/testGame
performing mainInit()
It just doesn't do anything after the screen darkens up. I'm building it manually from xCode, using iTGB_Script Optimize, Simulator 3.0, and Release configuration.
#3
Also make sure that the bundle has the resources inside it , if the dso files had not made it into the bundle it might stop at the project entry point.
10/21/2009 (4:27 am)
And it works on device? If so make sure all the preprocessor definitions match both builds, both according to the configuration you are using. Match the debug - device to debug - simulator settings exactly, excluding the SDK obviously. Also make sure that the bundle has the resources inside it , if the dso files had not made it into the bundle it might stop at the project entry point.
#4
Command /Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/gcc-4.2 failed with exit code 1
And I copied the main.cs file and the game and common folders into the project, which contain the dso's.
10/21/2009 (3:01 pm)
It actually doesn't work with the device either. At the end of xCode's compiling process, it comes up with the error message:Command /Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/gcc-4.2 failed with exit code 1
And I copied the main.cs file and the game and common folders into the project, which contain the dso's.
#5
Command /Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin/gcc-4.2 failed with exit code 1
look like this or close to it?
ld: library not found for -lcrt1.10.6.o
10/21/2009 (3:58 pm)
Does the line before Command /Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin/gcc-4.2 failed with exit code 1
look like this or close to it?
ld: library not found for -lcrt1.10.6.o
#7
My guess is that xcode is linking to libraries that it can't find. I recently upgraded my xcode to Snow Leopard 3.2 and I been having issues since then.
I don't have much time until this weekend, to really look at the problem. But on a different forum they recommended to uninstall the dev tools and reinstall them.
Hopefully someone can figure it out before this weekend and save me some time. :)
10/21/2009 (4:13 pm)
It means we both have the same issue :)My guess is that xcode is linking to libraries that it can't find. I recently upgraded my xcode to Snow Leopard 3.2 and I been having issues since then.
I don't have much time until this weekend, to really look at the problem. But on a different forum they recommended to uninstall the dev tools and reinstall them.
Hopefully someone can figure it out before this weekend and save me some time. :)
#8
10/21/2009 (4:21 pm)
If it could get solved, that would be great, as this is just the latest in a 6-month long string of issues I've been having. Good luck! If it does get solved before then, please tell me how, as I wouldn't mind knowing :)
#9
In your project select your target and right click and select "Get Info" search for "Mac OS X Deployment Target" if it is Mac OS X 10.5 change it to 10.6.
Hopefully it helps.
10/21/2009 (4:33 pm)
I just remembered that I did one thing that made it so my application work in the simulator, I did still have issues with trying to get it working on the iphone. Maybe it will help you out, that is if you just changed to Snow Leopard. In your project select your target and right click and select "Get Info" search for "Mac OS X Deployment Target" if it is Mac OS X 10.5 change it to 10.6.
Hopefully it helps.
#10
Can you guys try this stuff?
http://www.garagegames.com/community/forums/viewthread/104389
I know most of it is super obvious, but if we can track down the cause i would be more than grateful to help fix it.
Another note :
I have noticed a few things about my OSX setup that made me wonder why my game wasnt building for 4.2 or whatever, my game just wouldn't.
Can you try the following for me ?
Go into XCode and start a new project,call it tmp or whatever, and select an iPhone OpenGLES example from the cocoa touch menu.
Check the build settings on the target (ie : That its using 4.2) and check that its using "your desired settings". Run the app, and if you can deploy it to device and simulator it is most likely the project file that is broken, and you could try starting from the base project file in the folders (like i have, which worked for me, see thread above).
I found that files for gcc 4.2 were not where i (being a long time unix user) was expecting! This led me to believe the iPhoneOS stuff had not installed 4.2 properly, but the samples worked just fine. If the samples worked just fine, it must be something i changed. I started at square one, and i managed to build out of the box, with no changes to the system what so ever, and i managed to simply add my resources to the base project that i copied over, add my files for the code, build and go in 10 - 15 minutes (not even).
I am thinking that something somewhere somehow in that mystical beast that XCode calls build settings there is a weird setting that is making it not find the libstdc++ files (the ones you mentioned above). I attempted to use <string> and <map> both with success in the example OGLES template, and with failure in my game. I then fixed the project, and now it works just fine... Trippy right?
Please can you let me know how it goes, im keen to find a "this is the way to resolve this" out of the build flow!
10/22/2009 (1:42 pm)
Edit : Ricky - The libstdc++-static? Have you tried setting the "C++ Library type" to dynamic?Can you guys try this stuff?
http://www.garagegames.com/community/forums/viewthread/104389
I know most of it is super obvious, but if we can track down the cause i would be more than grateful to help fix it.
Another note :
I have noticed a few things about my OSX setup that made me wonder why my game wasnt building for 4.2 or whatever, my game just wouldn't.
Can you try the following for me ?
Go into XCode and start a new project,call it tmp or whatever, and select an iPhone OpenGLES example from the cocoa touch menu.
Check the build settings on the target (ie : That its using 4.2) and check that its using "your desired settings". Run the app, and if you can deploy it to device and simulator it is most likely the project file that is broken, and you could try starting from the base project file in the folders (like i have, which worked for me, see thread above).
I found that files for gcc 4.2 were not where i (being a long time unix user) was expecting! This led me to believe the iPhoneOS stuff had not installed 4.2 properly, but the samples worked just fine. If the samples worked just fine, it must be something i changed. I started at square one, and i managed to build out of the box, with no changes to the system what so ever, and i managed to simply add my resources to the base project that i copied over, add my files for the code, build and go in 10 - 15 minutes (not even).
I am thinking that something somewhere somehow in that mystical beast that XCode calls build settings there is a weird setting that is making it not find the libstdc++ files (the ones you mentioned above). I attempted to use <string> and <map> both with success in the example OGLES template, and with failure in my game. I then fixed the project, and now it works just fine... Trippy right?
Please can you let me know how it goes, im keen to find a "this is the way to resolve this" out of the build flow!
#11
Anything like this in the main, like /// BEGIN TORSION etc makes the app appear to die after maininit() in the console.
Also, The slight darkening of the logo, can you run in XCode and press "pause" in the debugger while it is in that darker state. If it has something along the lines of alerts and stuff, i can probably help you fix it too.
10/23/2009 (4:17 pm)
Some more possibilities for ya : enableDebugOutput( true ); dbgSetParameters( 6060, "password", false );
Anything like this in the main, like /// BEGIN TORSION etc makes the app appear to die after maininit() in the console.
Also, The slight darkening of the logo, can you run in XCode and press "pause" in the debugger while it is in that darker state. If it has something along the lines of alerts and stuff, i can probably help you fix it too.
#12
I also created the "tmp" project you were talking about. There was only one project type for OpenGLES in my menu, so I just did that, and it was a multicolored box moving up and down. It did work on both simulator and my device, so I'm guessing there's something wrong with the xCode project itself. Maybe after fixing all the library issues it will work.
10/24/2009 (12:38 pm)
Sven, just changed the library to dynamic in the target info, and now it can't find the library for "-lcrt1.10.6.o".I also created the "tmp" project you were talking about. There was only one project type for OpenGLES in my menu, so I just did that, and it was a multicolored box moving up and down. It did work on both simulator and my device, so I'm guessing there's something wrong with the xCode project itself. Maybe after fixing all the library issues it will work.
#13
10/24/2009 (5:17 pm)
Im pretty sure that its the project itself. I found it really simple to start from scratch, by just adding my scripts and resources, and adding my game code into the clean xcode project and everything worked fine. Not an idea for you?
#14
10/24/2009 (5:55 pm)
If by "starting from scratch", you mean redownloading iTorque and getting the new project out of that folder, then that's what I just did, and got the static library problem again.
#15
Check to see if your frameworks are pointing to the correct location. Open Xcode project and select the Frameworks folder, are they red or black?
Mine where red, so I selected the project "Torque2D" in "Groups & File" right clicked and select "Get Info". Then in the "General" Tab find "Base SDK for All Configurations:" (Mine said "iPhone Device 2.0 (missing)"), then select the build version you are targeting such as "iPhone Device 3.0"
Hopefully this helps your problems.
10/26/2009 (5:34 pm)
I did some work and I found what was causing my issues. I am still having some issues, but I thinking it is because of other things.Check to see if your frameworks are pointing to the correct location. Open Xcode project and select the Frameworks folder, are they red or black?
Mine where red, so I selected the project "Torque2D" in "Groups & File" right clicked and select "Get Info". Then in the "General" Tab find "Base SDK for All Configurations:" (Mine said "iPhone Device 2.0 (missing)"), then select the build version you are targeting such as "iPhone Device 3.0"
Hopefully this helps your problems.
#16
10/27/2009 (9:38 pm)
My frameworks were red, yeah. Did what you did but I just got the static library problem again, then after I changed that setting to dynamic, I'm back to my original screen darkening problem. Glad it seems to have worked for you though!
#17
10/28/2009 (5:18 pm)
Also, just upgraded to the latest xCode with support for 3.1.2. it gets past the loading screen but just comes up with a white screen after that. The other versions (3.1, 3.0) still do the same thing with the darkening loading screen.
#18
I've been trying a few things with xCode, and I noticed that every time I do a clean all targets, the products folder contains 2 files: iGame.app and <name of my program>.app (even if I name my game iGame, there are still 2 of them). Both are red. Is this a problem?
10/30/2009 (6:16 pm)
Update time:I've been trying a few things with xCode, and I noticed that every time I do a clean all targets, the products folder contains 2 files: iGame.app and <name of my program>.app (even if I name my game iGame, there are still 2 of them). Both are red. Is this a problem?
#19
10/30/2009 (7:16 pm)
probably because different targets have different app names.
#20
However, that still doesn't solve the problem at hand. Does anyone know what's going wrong from my posts on the 27th and 28th?
11/02/2009 (11:39 pm)
...alright, just checked, that's what it was. Thank you.However, that still doesn't solve the problem at hand. Does anyone know what's going wrong from my posts on the 27th and 28th?
Associate Sven Bergström
Luma Arcade
2) more information is required to help out :)