T2D and XCode?
by Joshua "RegularX" Birk · in Torque Game Builder · 04/07/2005 (5:54 am) · 18 replies
I've recently "switched" and am really just getting up to speed with XCode. Are there any quickie tutorials on how to get T2D setup as a project on the Mac?
About the author
#2
Is the project you're referencing the one in the "pb" dir?
Mike
04/07/2005 (10:00 am)
I'm a total n00b (just bought T2D yesterday) and I'm also new to my Mac (as far as development goes).Is the project you're referencing the one in the "pb" dir?
Mike
#3
The only problem you're likely to run into when building the engine on the Mac is when you try to link. You'll get an error about libogg.a and libvorbis.a. These are static libraries used for sound output, and they need some work before they can be linked against.
The fix is to open up Terminal and do something like this:
Now, when you try to build everything should link just fine. You'll should see a shiny new T2D-OSX.app in the pb/build directory.
Hope this helps.
04/07/2005 (11:16 am)
Yeah that's the one. "pb" stands for Project Builder, which is the old version of what is now called Xcode. Xcode will open up the .pbproj file just fine.The only problem you're likely to run into when building the engine on the Mac is when you try to link. You'll get an error about libogg.a and libvorbis.a. These are static libraries used for sound output, and they need some work before they can be linked against.
table of contents for archive: ../lib/vorbis/macosx/libogg.a is out of date; rerun ranlib(1) (can't load from it) table of contents for archive: ../lib/vorbis/macosx/libvorbis.a is out of date; rerun ranlib(1) (can't load from it)
The fix is to open up Terminal and do something like this:
cd /YOUR-TORQUE2D-FOLDER/lib/vorbis/macosx ranlib *.a
Now, when you try to build everything should link just fine. You'll should see a shiny new T2D-OSX.app in the pb/build directory.
Hope this helps.
#4
Q: WTF! GG R U GUNNA FIX THIS ITZ BROEK!!!!!!!!1
A: Dude, ranlib it.
Q:<^> WTF!!!!!!!! <^> U HAT MAX!!!!111 <^>
A: <^>
Q: Y O Y DO U HAET MEH!?!!??!!?!?!??!? I WANTA REFUDN!!!!
and then the conversation gets more productive from there.
04/07/2005 (1:07 pm)
You know, that's the most concise answer I've seen for that problem. It's usually something like this:Q: WTF! GG R U GUNNA FIX THIS ITZ BROEK!!!!!!!!1
A: Dude, ranlib it.
Q:<^> WTF!!!!!!!! <^> U HAT MAX!!!!111 <^>
A: <^>
Q: Y O Y DO U HAET MEH!?!!??!!?!?!??!? I WANTA REFUDN!!!!
and then the conversation gets more productive from there.
#5
Thanks again.
04/07/2005 (3:39 pm)
That worked and was exactly the kind of info I was looking for, thanks. Though I did end up with the debug version that required a force quit ... but I imagine that is my own noobery :)Thanks again.
#6
04/07/2005 (4:06 pm)
Oops. I've never played with the debug version myself. You can try your luck with the release version by selecting "Torque2D-MacCarb-Release" from the "Active Target" dropdown in the top-left corner of the project window.
#7
Edit: BTW, I built the release and debug versions with no trouble after running ranlib. Also had no trouble exiting.
04/09/2005 (12:56 am)
I'm a total newb to Mac, so this might be a dumb question, but why is the T2D-OSX.app file 74 megs? :O This is the release mode build. I admit I've done little research so far on the file types and so maybe I just need more time to learn.Edit: BTW, I built the release and debug versions with no trouble after running ranlib. Also had no trouble exiting.
#9
04/09/2005 (8:55 am)
In finder, right-click/CTRL-click on the T2D-OSX.app file and then select Show Package Contents to see what's inside the package.
#10
Most importantly, it's all running and I'm getting used to Xcode. Now to figure out how to create a compressed dmg file for distribution!
Thanks for the help!
04/09/2005 (9:38 am)
Hmm. There's the "executable" (I guess that's what it'd be considered) inside and it's 4.3 megs. Now Finder shows the .app file as 60kb! Seems the contents are normal, but the Get Info report is odd, or I'm probably just too new to know what's going on. :) The debug .app is 21megs, which I understand that if it's got debug symbols etc in it.Most importantly, it's all running and I'm getting used to Xcode. Now to figure out how to create a compressed dmg file for distribution!
Thanks for the help!
#11
04/10/2005 (10:18 am)
Another newbie question. I'm editing my cs files within XCode ... is there a way to get it do some basic syntax highlighting?
#12
04/10/2005 (11:17 am)
Yes use this resource and follow the modifications i just added and it will work with xcode (version 1.5)
#13
04/13/2005 (5:25 pm)
I don't seem to have an "Application Support" folder ... so not sure where to put/find the Specification folder :(
#14
04/14/2005 (11:01 am)
Just so you guys know, the next version of Torque will get rid of libogg and libvorbis.a on OS X in favor of the framework versions of those libs. So, the ranlib thing will (finally!) go away. I'll probably also change the "pb" directory to "xcode". T2D will inherit all this as well, after the next Torque update.
#15
(Sorry, I know you must be sick of these constant questions about updates. I honestly don't want to annoy you.)
04/17/2005 (7:46 pm)
@Josh: This, of course, begs the question "when is the next TGE update?" :)(Sorry, I know you must be sick of these constant questions about updates. I honestly don't want to annoy you.)
#16
resManager.h:38: error: forward declaration of 'struct ResManager'
Four of those, with the same line number warning
resManager.h:255: error: invalid use of undefined type 'struct ResManager'
Four of those, with different line number in the warning.
Uh. I really have no idea what the deal with OSX is and stuff. I've installed all of the development stuff, and lots of files successfully compiled before I got an error on that one.
So, uhm... Any ideas?
Gary (-;
05/21/2005 (8:32 pm)
Hmmm. Total Apple newb, here [approximately three hours at time of writing]:resManager.h:38: error: forward declaration of 'struct ResManager'
Four of those, with the same line number warning
resManager.h:255: error: invalid use of undefined type 'struct ResManager'
Four of those, with different line number in the warning.
Uh. I really have no idea what the deal with OSX is and stuff. I've installed all of the development stuff, and lots of files successfully compiled before I got an error on that one.
So, uhm... Any ideas?
Gary (-;
#17
www.garagegames.com/mg/forums/result.thread.php?qt=29512
People (including myself) have had success by switching the compiler back to GCC 3.3 (xCode 2.0 defaults to GCC 4.0)
Bri
05/23/2005 (1:57 am)
If you are running OSX 10.4, try this thread:www.garagegames.com/mg/forums/result.thread.php?qt=29512
People (including myself) have had success by switching the compiler back to GCC 3.3 (xCode 2.0 defaults to GCC 4.0)
Bri
#18
Gary (-;
05/23/2005 (2:02 am)
@Brian: Thanks! I found that thread shortly after I wrote my message, and that seems to have fixed the problem.Gary (-;
Torque Owner Greg Lincoln