BuildProblems - AudioDataBlock
by Nils Munch · in Torque Game Engine · 06/15/2005 (5:14 am) · 8 replies
Just purchased the indie license, downloaded the engine, and here's what happened when i run the torque_pb_2_1.pbproj in Xcode:
../engine/platform/event.h:127: error: 'data' was not declared in this scope
../engine/platform/event.h:127: error: expected primary-expression before ')' token
../engine/platform/event.h:127: error: a function call cannot appear in a constant-expression
../engine/platform/event.h:130: error: 'data' was not declared in this scope
../engine/platform/event.h:130: error: expected primary-expression before ')' token
../engine/platform/event.h:130: error: a function call cannot appear in a constant-expression
../engine/platform/event.h:133: error: 'data' was not declared in this scope
../engine/platform/event.h:133: error: expected primary-expression before ')' token
../engine/platform/event.h:133: error: a function call cannot appear in a constant-expression
../engine/audio/audioDataBlock.h:29: error: invalid use of member 'AudioEnvironment::mUseRoom' in static member function
../engine/audio/audioDataBlock.cc:102: error: from this location
../engine/audio/audioDataBlock.cc:102: error: expected primary-expression before ')' token
../engine/audio/audioDataBlock.cc:102: error: 'Offset' was not declared in this scope
../engine/audio/audioDataBlock.h:30: error: invalid use of member 'AudioEnvironment::mRoom' in static member function
../engine/audio/audioDataBlock.cc:103: error: from this location
... it goes on like this for 157 errors :( ...
../engine/audio/audioDataBlock.cc:434: error: expected primary-expression before ')' token
../engine/audio/audioDataBlock.h:123: error: invalid use of member 'AudioProfile::mPreload' in static member function
../engine/audio/audioDataBlock.cc:435: error: from this location
../engine/audio/audioDataBlock.cc:435: error: expected primary-expression before ')' token
please, im rather new at this, anyone has any idea what to do?
(xtools = 2.1)
../engine/platform/event.h:127: error: 'data' was not declared in this scope
../engine/platform/event.h:127: error: expected primary-expression before ')' token
../engine/platform/event.h:127: error: a function call cannot appear in a constant-expression
../engine/platform/event.h:130: error: 'data' was not declared in this scope
../engine/platform/event.h:130: error: expected primary-expression before ')' token
../engine/platform/event.h:130: error: a function call cannot appear in a constant-expression
../engine/platform/event.h:133: error: 'data' was not declared in this scope
../engine/platform/event.h:133: error: expected primary-expression before ')' token
../engine/platform/event.h:133: error: a function call cannot appear in a constant-expression
../engine/audio/audioDataBlock.h:29: error: invalid use of member 'AudioEnvironment::mUseRoom' in static member function
../engine/audio/audioDataBlock.cc:102: error: from this location
../engine/audio/audioDataBlock.cc:102: error: expected primary-expression before ')' token
../engine/audio/audioDataBlock.cc:102: error: 'Offset' was not declared in this scope
../engine/audio/audioDataBlock.h:30: error: invalid use of member 'AudioEnvironment::mRoom' in static member function
../engine/audio/audioDataBlock.cc:103: error: from this location
... it goes on like this for 157 errors :( ...
../engine/audio/audioDataBlock.cc:434: error: expected primary-expression before ')' token
../engine/audio/audioDataBlock.h:123: error: invalid use of member 'AudioProfile::mPreload' in static member function
../engine/audio/audioDataBlock.cc:435: error: from this location
../engine/audio/audioDataBlock.cc:435: error: expected primary-expression before ')' token
please, im rather new at this, anyone has any idea what to do?
(xtools = 2.1)
#2
// compiler is GCC 3 with minor version greater than 4
#elif defined(TORQUE_COMPILER_GCC) && (__GNUC__ == 3) && (__GNUC_MINOR__ >= 4)
#include
#define Offset(x, cls) _Offset_Variant_2(x, cls)
#define OffsetNonConst(x, cls) _Offset_Variant_1(x, cls)
// compiler is GCC 4
#elif defined(TORQUE_COMPILER_GCC) && (__GNUC__ == 4)
#include
#define Offset(x, cls) _Offset_Variant_2(x, cls)
#define OffsetNonConst(x, cls) _Offset_Variant_1(x, cls)
07/24/2005 (3:48 pm)
In types.h the code under the second comment needs to be added. For me this brought it down to two errors// compiler is GCC 3 with minor version greater than 4
#elif defined(TORQUE_COMPILER_GCC) && (__GNUC__ == 3) && (__GNUC_MINOR__ >= 4)
#include
#define Offset(x, cls) _Offset_Variant_2(x, cls)
#define OffsetNonConst(x, cls) _Offset_Variant_1(x, cls)
// compiler is GCC 4
#elif defined(TORQUE_COMPILER_GCC) && (__GNUC__ == 4)
#include
#define Offset(x, cls) _Offset_Variant_2(x, cls)
#define OffsetNonConst(x, cls) _Offset_Variant_1(x, cls)
#3
# define __EQUAL_CONST_F F32(0.000001)
in types.h
?
Nothing really happends when i do that... sorry that im a bit slow at this...
07/30/2005 (3:53 am)
You mean i should unhash the line :# define __EQUAL_CONST_F F32(0.000001)
in types.h
?
Nothing really happends when i do that... sorry that im a bit slow at this...
#4
// compiler is GCC 4
needs to be added. It's at the very bottom of the types.h file. Don't do anything with the
# define __EQUAL_CONST_F F32(0.000001)
line of code. Sorry for the confusion. If you still don't get it don't be affraid to ask.
Nathan
07/30/2005 (7:59 am)
Sorry for the confusion... I meant everything in the above code under the second comment needs to be added since OS X Tiger uses gcc 4. In other words... the part of the code under the comment// compiler is GCC 4
needs to be added. It's at the very bottom of the types.h file. Don't do anything with the
# define __EQUAL_CONST_F F32(0.000001)
line of code. Sorry for the confusion. If you still don't get it don't be affraid to ask.
Nathan
#5
08/09/2005 (4:19 am)
Thanks Nathan, adding those lines fixed the same problem on Ubuntu Breezy, which also uses GCC 4. Much appreciated! =)
#6
Nathan
08/09/2005 (10:47 pm)
You're welcome :) More thanks goes to the person who I got it from (whom I can't remember). It's in another thread on this site somewhere, but, this thread is easier to find for build problems, I think.Nathan
#7
- Erling
08/27/2005 (1:45 pm)
Last week I bought the TGE and today got started and naturally ran into this problem too. Following your instructions has solved the building problem. Thanks a bunch!- Erling
#8
08/27/2005 (1:53 pm)
Cool! I knew it would be easier to find here.
Torque Owner Nathan Warden
Nathan Warden