Game Development Community

Compiling T2D with xCode 2.0

by Rob Ackermann · in Torque Game Builder · 05/14/2005 (3:22 pm) · 3 replies

Hey, I just bought Torque 2D yesterday. I'm running OS 10.4 with xCode 2.0 installed. The example engine runs decently enough, but when I try to build the engine from the project builder project I get these errors:

resManager.h:38: error: forward declaration of 'struct ResManager'
resManager.h:41: error: expected initializer before '*' token
resManager.h:255: error: invalid use of undefined type 'struct ResManager'
resManager.h:255: error: 'ResourceManager' was not declared in this scope
resManager.h:255: error: invalid use of undefined type 'struct ResManager'
resManager.h:263: error: 'ResourceManager' was not declared in this scope
resManager.h:263: error: invalid use of undefined type 'struct ResManager'
resManager.h:263: error: invalid use of undefined type 'struct ResManager'
resManager.h:265: error: invalid use of undefined type 'struct ResManager'
resManager.h:265: error: invalid use of undefined type 'struct ResManager'
resManager.h:278: error: invalid use of undefined type 'struct ResManager'
resManager.h:278: error: invalid use of undefined type 'struct ResManager'
resManager.h:278: error: 'ResourceManager' was not declared in this scope

I'm guessing this is happening because Tiger uses gcc 2.0 (right?). Anyway, if anyone knows how to fix this and wants to share it'd be great.

That said, I'm very impressed with T2D. I'm in college right now, with CS and Math taking up most of my time, so I'm not sure if I'm going to make a full game with it any time soon. Even if I don't, it's going to be great just to mess around with.

Thanks!

About the author

Recent Threads


#1
05/15/2005 (5:41 am)
Hi Robert,

There's a solution to this problem here - it involves switching to GCC 3.3 (as opposed to 4.0 that Xcode defaults to) and updating your targets. There's a specific order to doing this - let me know if you have any problems.

Chris
#2
05/15/2005 (8:52 am)
Thanks, that fixed things.

Is there a way to search the forums? Am I blind?
#3
05/15/2005 (11:05 am)
I have seen the 'struct ResManager' error before, IIRC someone suggested a fix of moving the struct to the top of the .cc file, I'll search the forums for the thread

-Ron