Game Development Community

Xcode produces 160 build errors

by Andrei Nadin · in Technical Issues · 10/17/2005 (12:35 pm) · 3 replies

Hi,

I have tried to compile TorqueSDK 'out-of-the-box' on XCode v2.0

It produces 160 (exactly) build errors :(

I think this may be something to do with OpenAL, but I have tried installing CoreAudio SDK (latest version from Apple) and according to the same page I downloaded it from, Mac OS 10.4 should come with OpenAL preinstalled.

I'll just give you the starting dump of the error output ... if this is OpenAL then where is the best place to get an OpenAL SDK installer for Mac OS 10.4?

Thanks in advance!

/usr/bin/g++-4.0 -c "-I/Users/mjjw/Desktop/TorqueGameEngineSDK/pb/build/torque_pb_2_1.build/Torque-MacCarb-Debug.build/Torque Demo Debug OSX.hmap" -F/Users/mjjw/Desktop/TorqueGameEngineSDK/pb/build -F../lib/openal/macCarb -I/Users/mjjw/Desktop/TorqueGameEngineSDK/pb/build/include -I../engine -I../lib -I/System/Library/Frameworks/CoreServices.framework/Versions/Current/Frameworks/CarbonCore.framework/Headers -I/System/Library/Frameworks/CoreServices.framework/Versions/Current/Frameworks/OT.framework/Headers -I/System/Library/Frameworks/ApplicationServices.framework/Versions/Current/Frameworks/QD.framework/Headers -I/System/Library/Frameworks/Carbon.framework/Versions/Current/Frameworks/HIToolbox.framework/Headers -I/System/Library/Frameworks/OpenGL.framework/Headers -I/System/Library/Frameworks/Carbon.framework/Headers -I/System/Library/Frameworks/AGL.framework/Headers -I../lib/openal/maccarb -I../lib/openal/maccarb/al -I/Developer/Headers/FlatCarbon -I../lib/vorbis/include -I../lib/lpng -I../lib/zlib -I../lib/ljpeg -I../lib/lungif -I../engine/audio -arch ppc -fno-common -fpascal-strings -O0 -w -pipe "-fmessage-length=0" -mdynamic-no-pic -g "-fpermissive" "-force_cpusubtype_ALL" "-D__MACOSX__" ../engine/audio/audioDataBlock.cc -o /Users/mjjw/Desktop/TorqueGameEngineSDK/pb/build/torque_pb_2_1.build/Torque-MacCarb-Debug.build/Objects-normal/ppc/audioDataBlock.o
../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:127: error: enumerator value for 'PacketReceiveEventHeaderSize' not integer constant
../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:130: error: enumerator value for 'ConnectedReceiveEventHeaderSize' not integer constant
../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/platform/event.h:133: error: enumerator value for 'ConsoleEventHeaderSize' not integer constant
../engine/audio/audioDataBlock.cc: In static member function 'static void AudioEnvironment::initPersistFields()':
../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
../engine/audio/audioDataBlock.cc:103: error: expected primary-expression before ')' token

#1
10/17/2005 (12:51 pm)
Update: I have just tried downloading OpenAL from the creative website and installing it ... but still the same 160 errors.
#2
10/17/2005 (1:00 pm)
Folund the solution myself! Teach me not to search hard enough ...

http://www.garagegames.com/mg/forums/result.thread.php?qt=31118

I really think that needs adding to a FAQ somewhere though

Basically some lines needed adding to the bottom of types.h - which isn't in the project file - I had to go to the file in Finder, double-click to open in XCode, then copy and pasted the lines into the bottom.

For the lazy people who don't want to follow that link but have the same problem ... Open TorqueGameEngineSDK/engine/platform/types.h

go right down to the bottom, find where it says :

// 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)

and paste this directly below it (before the #endifs):

// 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)

Then it should compile!
#3
10/17/2005 (4:01 pm)
@Andrei: For the moment, the 'out of box' stuff I talked about in my plan only applies to TGE 1.4rc2, which is available on CVS.