PDA

View Full Version : Help a newb with xcode!




Kingsly
Apr 16, 2006, 04:51 PM
Okay, I have absolutely no clue what I'm doing. I hav tried to compile Torque (http://www.garagegames.com/products/1) with Xcode 2 and I keep getting 9 errors.
I know there is more info req'd but I wouldn't know exactly what, so either reply or PM me.
thanks!



kainjow
Apr 18, 2006, 01:26 AM
Post the first error message in full. It's usually the most important.

Eraserhead
Apr 18, 2006, 07:54 AM
I'd say post all the error messages, they often (at least with Java) tell you which line of code is going wrong so post them too..

EDIT the above isn't clear, post the line of code causing the problem (and the above and below lines too...) if you can work them out otherwise post all of the code.

SC68Cal
Apr 18, 2006, 11:03 AM
If you are a newb, why are you trying to compile a game rendering engine?????

Kingsly
Apr 18, 2006, 11:42 AM
If you are a newb, why are you trying to compile a game rendering engine?????
Because their marketing spiel convinced me it would be easy. Oh well.

Brace yourselves, here are the error messages, all affecting a source file called AudioBuffer.cc (although when I click the actual error it takes to another file called ResManager.h)
I get this (4) times:resManager.h:38: error: forward declaration of 'struct ResManager'

the actual code:class Stream;
class FileStream;
class ZipSubRStream;
class ResManager;
class FindMatch;

extern ResManager *ResourceManager;


I get this (4) times, all on different lines:resManager.h:255: error: invalid use of undefined type 'struct ResManager'


Here are the lines, in order: {
if (obj) {
ResourceManager->unlock( obj );
obj=NULL;
}
{
if (obj) {
ResourceManager->unlock( obj );
if (obj->lockCount == 0)
ResourceManager->purge(obj);
obj = NULL;
}

{
if (obj) {
ResourceManager->unlock( obj );
if (obj->lockCount == 0)
ResourceManager->purge(obj);
obj = NULL;
}

{
if (obj)
ResourceManager->unlock( obj );
}


If any more info is needed, please let me know. I would imagine there is some kind of error log I can export to you or something. Again, I feel ridiculous for getting myself into this... but their not too keen on giving me my $100 back and I would rather have the engine anyway. ;)

Kingsly
Apr 18, 2006, 12:21 PM
Dang. I fixed the ResManager problem:) . Now it fizzles out at a new file, event.h :mad:

Here: event.h:137: error: a cast to a type other than an integral or enumeration type cannot appear in a constant-expression
event.h:137: error: `&' cannot appear in a constant-expression
event.h:137: error: '->' cannot appear in a constant-expression
event.h:140: error: `&' cannot appear in a constant-expression
event.h:140: error: '->' cannot appear in a constant-expression
event.h:140: error: a cast to a type other than an integral or enumeration type cannot appear in a constant-expression
event.h:143: error: `&' cannot appear in a constant-expression
event.h:143: error: '->' cannot appear in a constant-expression
event.h:143: error: a cast to a type other than an integral or enumeration type cannot appear in a constant-expression
Tool:0: Command /Developer/Private/jam failed with exit code 1
Tool:0: Command /Developer/Private/jam failed with exit code 1
Tool:0: Command /Developer/Private/jam failed with exit code 1

Here are lines 137, 140 and 143, respectively (with the offending line in bold):
{
/// Byte offset to payload of a PacketReceiveEvent
PacketReceiveEventHeaderSize = Offset(data,PacketReceiveEvent),

/// Byte offset to payload of a ConnectedReceiveEvent
ConnectedReceiveEventHeaderSize = Offset(data,ConnectedReceiveEvent),

/// Byte offset to payload of a ConsoleEvent
ConsoleEventHeaderSize = Offset(data,ConsoleEvent)

};

{
/// Byte offset to payload of a PacketReceiveEvent
PacketReceiveEventHeaderSize = Offset(data,PacketReceiveEvent),

/// Byte offset to payload of a ConnectedReceiveEvent
ConnectedReceiveEventHeaderSize = Offset(data,ConnectedReceiveEvent),

/// Byte offset to payload of a ConsoleEvent
ConsoleEventHeaderSize = Offset(data,ConsoleEvent)

};


{
/// Byte offset to payload of a PacketReceiveEvent
PacketReceiveEventHeaderSize = Offset(data,PacketReceiveEvent),

/// Byte offset to payload of a ConnectedReceiveEvent
ConnectedReceiveEventHeaderSize = Offset(data,ConnectedReceiveEvent),

/// Byte offset to payload of a ConsoleEvent
ConsoleEventHeaderSize = Offset(data,ConsoleEvent)

};