Help a newb with xcode!

Discussion in 'Mac Programming' started by Kingsly, Apr 16, 2006.

  1. macrumors 68040

    Kingsly

    #1
    Okay, I have absolutely no clue what I'm doing. I hav tried to compile Torque 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!
     
  2. Moderator emeritus

    kainjow

    Joined:
    Jun 15, 2000
    #2
    Post the first error message in full. It's usually the most important.
     
  3. macrumors G4

    Eraserhead

    Joined:
    Nov 3, 2005
    Location:
    UK
    #3
    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.
     
  4. macrumors 68000

    Joined:
    Feb 23, 2006
    #4
    If you are a newb, why are you trying to compile a game rendering engine?????
     
  5. thread starter macrumors 68040

    Kingsly

    #5
    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:
    Code:
    resManager.h:38: error: forward declaration of 'struct ResManager'
    
    the actual code:
    Code:
    class Stream;
    class FileStream;
    class ZipSubRStream;
    [B]class ResManager;[/B]
    class FindMatch;
    
    extern ResManager *ResourceManager;
    
    I get this (4) times, all on different lines:
    Code:
    resManager.h:255: error: invalid use of undefined type 'struct ResManager'
    
    Here are the lines, in order:
    Code:
    {
       if (obj) {
          ResourceManager->unlock( obj );
          obj=NULL;
       }
    Code:
    {
       if (obj) { 
          ResourceManager->unlock( obj );
          if (obj->lockCount == 0)
             ResourceManager->purge(obj); 
          obj = NULL;
       }
    
    Code:
    {
       if (obj) { 
          ResourceManager->unlock( obj );
          if (obj->lockCount == 0)
             ResourceManager->purge(obj); 
          obj = NULL;
       }
    
    Code:
    {
       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. ;)
     
  6. thread starter macrumors 68040

    Kingsly

    #6
    Dang. I fixed the ResManager problem:) . Now it fizzles out at a new file, event.h :mad:

    Here:
    Code:
    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):
    Code:
    {
       /// Byte offset to payload of a PacketReceiveEvent
    [B]   PacketReceiveEventHeaderSize = Offset(data,PacketReceiveEvent),[/B]
      
     /// Byte offset to payload of a ConnectedReceiveEvent
       ConnectedReceiveEventHeaderSize = Offset(data,ConnectedReceiveEvent),
    
       /// Byte offset to payload of a ConsoleEvent
       ConsoleEventHeaderSize = Offset(data,ConsoleEvent)
    
    };
    Code:
    {
       /// Byte offset to payload of a PacketReceiveEvent
       PacketReceiveEventHeaderSize = Offset(data,PacketReceiveEvent),
    
       /// Byte offset to payload of a ConnectedReceiveEvent
       [B]ConnectedReceiveEventHeaderSize = Offset(data,ConnectedReceiveEvent),[/B]
    
       /// Byte offset to payload of a ConsoleEvent
       ConsoleEventHeaderSize = Offset(data,ConsoleEvent)
    
    };
    
    Code:
    {
       /// 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
       [B]ConsoleEventHeaderSize = Offset(data,ConsoleEvent)
    [/B]
    };
    
     

Share This Page