Game Development Community

Compile problem with Mandrake 9.1

by Alex \"bathala\" Rufon · in Torque Game Engine · 05/17/2003 (10:02 am) · 26 replies

Hello.

I just upgraded to Mandrake 9.1 (from 9.0) after the last windows crash. I just downloaded the latest CVS HEAD (20030516) and setup the system as described in the getting started guide.

So when I was compiling it, I got the following errors:
--> Compiling audio/audio.cc
audio/audio.cc:39: 'AudioBuffer' was not declared in this scope
audio/audio.cc:39: template argument 1 is invalid
audio/audio.cc:39: ISO C++ forbids declaration of 'mBuffer' with no type
audio/audio.cc:70: 'AudioBuffer' was not declared in this scope
audio/audio.cc:70: template argument 1 is invalid
audio/audio.cc:70: ISO C++ forbids declaration of 'mBuffer' with no type
audio/audio.cc:390: 'AudioBuffer' was not declared in this scope
audio/audio.cc:390: template argument 1 is invalid
audio/audio.cc:391: ISO C++ forbids declaration of 'buffer' with no type
audio/audio.cc: In function 'void alxSourcePlay(unsigned int, int, const Audio::
Description*, const MatrixF*)':
audio/audio.cc:392: base operand of '->' is not a pointer
audio/audio.cc: In function 'AUDIOHANDLE alxCreateSource(const Audio::Descriptio
n*, const char*, const MatrixF*, AudioSampleEnvironment*)':
audio/audio.cc:508: 'AudioBuffer' undeclared (first use this function)
audio/audio.cc:508: (Each undeclared identifier is reported only once for each f
unction it appears in.)
audio/audio.cc:508: template argument 1 is invalid
audio/audio.cc:508: ISO C++ forbids declaration of 'buffer' with no type
audio/audio.cc:508: parse error before '::' token
audio/audio.cc:544: template argument 1 is invalid
audio/audio.cc:544: ISO C++ forbids declaration of 'buffer' with no type
audio/audio.cc:544: parse error before '::' token
audio/audio.cc: In function 'AUDIOHANDLE alxCreateSource(AudioDescription*, cons
t char*, const MatrixF*, AudioSampleEnvironment*)':
audio/audio.cc:599: invalid use of undefined type 'struct AudioDescription'
platform/platformAudio.h:69: forward declaration of 'struct AudioDescription'
audio/audio.cc:601: invalid use of undefined type 'struct AudioDescription'
platform/platformAudio.h:69: forward declaration of 'struct AudioDescription'
audio/audio.cc: In function 'AUDIOHANDLE alxCreateSource(const AudioProfile*, co
nst MatrixF*)':
audio/audio.cc:609: invalid use of undefined type 'struct AudioProfile'
platform/platformAudio.h:70: forward declaration of 'struct AudioProfile'
audio/audio.cc:609: invalid use of undefined type 'struct AudioProfile'
platform/platformAudio.h:70: forward declaration of 'struct AudioProfile'
audio/audio.cc:609: invalid use of undefined type 'struct AudioProfile'
platform/platformAudio.h:70: forward declaration of 'struct AudioProfile'
audio/audio.cc: At global scope:
audio/audio.cc:613: 'buffer' was not declared in this scope
audio/audio.cc:613: parse error before ')' token
audio/audio.cc: In function 'AUDIOHANDLE alxPlay(const AudioProfile*, const Matr
ixF*, const Point3F*)':
audio/audio.cc:665: invalid use of undefined type 'struct AudioProfile'
platform/platformAudio.h:70: forward declaration of 'struct AudioProfile'
audio/audio.cc:665: invalid use of undefined type 'struct AudioProfile'
platform/platformAudio.h:70: forward declaration of 'struct AudioProfile'
audio/audio.cc:665: invalid use of undefined type 'struct AudioProfile'
platform/platformAudio.h:70: forward declaration of 'struct AudioProfile'
audio/audio.cc: In function 'bool Audio::prepareContext()':
audio/audio.cc:1689: cannot dynamic_cast '*itr' (of type 'class SimObject*') to
type 'struct AudioProfile*' (target is not pointer or reference to complete type                                                          )
audio/audio.cc:1690: invalid use of undefined type 'struct AudioProfile'
platform/platformAudio.h:70: forward declaration of 'struct AudioProfile'
audio/audio.cc:1692: template argument 1 is invalid
audio/audio.cc:1692: ISO C++ forbids declaration of 'buffer' with no type
audio/audio.cc:1692: parse error before '::' token
audio/audio.cc:1694: base operand of '->' is not a pointer
audio/audio.cc: In function 'void Audio::OpenALShutdown()':
audio/audio.cc:1786: request for member 'purge' in '(&mLoopingList)->VectorPtr<T                                                          >::last() [with T = LoopingImage*]()->LoopingImage::mBuffer', which is of non-ag                                                          gregate type 'int'
audio/audio.cc:1793: request for member 'purge' in '(&mLoopingFreeList)->VectorP                                                          tr<T>::last() [with T = LoopingImage*]()->LoopingImage::mBuffer', which is of no                                                          n-aggregate type 'int'
console/simBase.h: In member function 'SimObjectPtr<T>::operator T*() const [wit                                                          h T = AudioEnvironment]':
audio/audio.cc:1581:   instantiated from here
console/simBase.h:334: invalid static_cast from type 'SimObject* const' to type                                                           'AudioEnvironment*'
console/simBase.h:334: invalid static_cast from type 'SimObject* const' to type                                                           'AudioEnvironment*'
make[1]: *** [out.GCC2.DEBUG/audio/audio.obj] Error 1
make: *** [default] Error 2

Can anybody help? I'm at a loss.

Thanks.

Alex

edit: remove spurious code cut and paste.

About the author

I am an independent game developer who's never going to make it in the industry because I'm color blind and has absolutely no imagination.

Page«First 1 2 Next»
#21
07/12/2003 (12:07 pm)
I fixed the problem by adding includes. I'll see if I can do a patch but I'm pretty busy for a while so I can't make any promises.
#22
07/12/2003 (12:40 pm)
I did a clean compile on a clean ManDrake 9.X box and only made the changes I listed above

Quote:
1) in the audio headers files remove audio/ from each audio header file
2) in the game/ dir edit each file that includes an audio header and replace audio/ with ../audio/
3) in the game/vehicle dir edit each file that includes an audio header and replace audio/ with ../../audio/

-Ron
#23
07/12/2003 (12:45 pm)
I didn't make those changes Ron; I just added a couple of includes to a number of files.
#24
07/12/2003 (1:32 pm)
Yeah, you could have done the add includes or fixed the includes that were their.. either way gets a compile.
If I recall correctly, the header files in the audio dir are not being found. Adding the relative path to the audio files resolves the issue.


#include "audio/someaudio.h"

needs to be changed to either

#include "../audio/someaudio.h"

or

#include "../../audio/someaudio.h"

-Ron
#25
08/20/2003 (4:36 am)
[Part I]

In case anyone else is interested this is a diff i did that seemed safer than using relative paths and still should be compatible with other platforms.

Note its split in to as it was too big to fit in one message

diff -Nur torque_head/engine/audio/audio.cc ../Code/Gaming/torque_head/engine/audio/audio.cc
--- torque_head/engine/audio/audio.cc	2003-05-02 12:35:40.000000000 -0400
+++ ../Code/Gaming/torque_head/engine/audio/audio.cc	2003-08-17 09:04:27.000000000 -0400
@@ -4,6 +4,7 @@
 //-----------------------------------------------------------------------------
 
 #include "audio/audio.h"
+#include "audio/audioDataBlock.h"
 #include "core/tVector.h"
 #include "console/console.h"
 #include "console/consoleTypes.h"
diff -Nur torque_head/engine/game/audioEmitter.h ../Code/Gaming/torque_head/engine/game/audioEmitter.h
--- torque_head/engine/game/audioEmitter.h	2003-08-04 18:26:46.000000000 -0400
+++ ../Code/Gaming/torque_head/engine/game/audioEmitter.h	2003-08-17 09:15:18.000000000 -0400
@@ -9,8 +9,8 @@
 #ifndef _SCENEOBJECT_H_
 #include "sim/sceneObject.h"
 #endif
-#ifndef _AUDIO_H_
-#include "audio/audio.h"
+#ifndef _AUDIODATABLOCK_H_
+#include "audio/audioDataBlock.h"
 #endif
 #ifndef _NETCONNECTION_H_
 #include "sim/netConnection.h"
diff -Nur torque_head/engine/game/gameConnection.cc ../Code/Gaming/torque_head/engine/game/gameConnection.cc
--- torque_head/engine/game/gameConnection.cc	2003-08-04 18:26:46.000000000 -0400
+++ ../Code/Gaming/torque_head/engine/game/gameConnection.cc	2003-08-17 09:15:22.000000000 -0400
@@ -11,7 +11,7 @@
 #include "sim/pathManager.h"
 #include "sceneGraph/sceneGraph.h"
 #include "sceneGraph/sceneLighting.h"
-#include "audio/audio.h"
+#include "audio/audioDataBlock.h"
 #include "game/game.h"
 #include "game/shapeBase.h"
 #include "game/gameConnection.h"
diff -Nur torque_head/engine/game/gameConnectionEvents.cc ../Code/Gaming/torque_head/engine/game/gameConnectionEvents.cc
--- torque_head/engine/game/gameConnectionEvents.cc	2003-08-04 18:26:46.000000000 -0400
+++ ../Code/Gaming/torque_head/engine/game/gameConnectionEvents.cc	2003-08-17 09:15:26.000000000 -0400
@@ -10,7 +10,7 @@
 #include "console/simBase.h"
 #include "sim/pathManager.h"
 #include "sceneGraph/sceneGraph.h"
-#include "audio/audio.h"
+#include "audio/audioDataBlock.h"
 #include "game/game.h"
 #include "game/gameConnection.h"
 #include "game/shapeBase.h"
diff -Nur torque_head/engine/game/player.cc ../Code/Gaming/torque_head/engine/game/player.cc
--- torque_head/engine/game/player.cc	2003-08-04 18:26:46.000000000 -0400
+++ ../Code/Gaming/torque_head/engine/game/player.cc	2003-08-17 09:14:35.000000000 -0400
@@ -22,7 +22,7 @@
 #include "collision/earlyOutPolyList.h"
 #include "sim/decalManager.h"
 #include "ts/tsShapeInstance.h"
-#include "audio/audio.h"
+#include "audio/audioDataBlock.h"
 #include "sceneGraph/sceneGraph.h"
 #include "sceneGraph/sceneState.h"
 #include "sceneGraph/detailManager.h"
diff -Nur torque_head/engine/game/shapeBase.cc ../Code/Gaming/torque_head/engine/game/shapeBase.cc
--- torque_head/engine/game/shapeBase.cc	2003-08-04 18:26:46.000000000 -0400
+++ ../Code/Gaming/torque_head/engine/game/shapeBase.cc	2003-08-17 09:16:39.000000000 -0400
@@ -6,7 +6,7 @@
 #include "dgl/dgl.h"
 #include "platform/platform.h"
 #include "core/dnet.h"
-#include "audio/audio.h"
+#include "audio/audioDataBlock.h"
 #include "game/gameConnection.h"
 #include "game/moveManager.h"
 #include "console/consoleTypes.h"
#26
08/20/2003 (4:37 am)
[Part II]

diff -Nur torque_head/engine/game/shapeImage.cc ../Code/Gaming/torque_head/engine/game/shapeImage.cc
--- torque_head/engine/game/shapeImage.cc	2003-08-04 18:26:46.000000000 -0400
+++ ../Code/Gaming/torque_head/engine/game/shapeImage.cc	2003-08-17 09:17:07.000000000 -0400
@@ -9,7 +9,7 @@
 #include "console/consoleInternal.h"
 #include "console/consoleTypes.h"
 #include "game/fx/particleEngine.h"
-#include "audio/audio.h"
+#include "audio/audioDataBlock.h"
 #include "game/shapeBase.h"
 #include "game/projectile.h"
 #include "game/gameConnection.h"
diff -Nur torque_head/engine/game/vehicles/flyingVehicle.cc ../Code/Gaming/torque_head/engine/game/vehicles/flyingVehicle.cc
--- torque_head/engine/game/vehicles/flyingVehicle.cc	2003-08-04 18:26:47.000000000 -0400
+++ ../Code/Gaming/torque_head/engine/game/vehicles/flyingVehicle.cc	2003-08-17 09:18:10.000000000 -0400
@@ -20,7 +20,7 @@
 #include "game/gameConnection.h"
 #include "ts/tsShapeInstance.h"
 #include "game/fx/particleEngine.h"
-#include "audio/audio.h"
+#include "audio/audioDataBlock.h"
 #include "game/missionArea.h"
 
 //----------------------------------------------------------------------------
diff -Nur torque_head/engine/game/vehicles/hoverVehicle.cc ../Code/Gaming/torque_head/engine/game/vehicles/hoverVehicle.cc
--- torque_head/engine/game/vehicles/hoverVehicle.cc	2003-08-04 18:26:47.000000000 -0400
+++ ../Code/Gaming/torque_head/engine/game/vehicles/hoverVehicle.cc	2003-08-17 09:18:16.000000000 -0400
@@ -15,7 +15,7 @@
 #include "console/consoleTypes.h"
 #include "terrain/terrData.h"
 #include "sceneGraph/sceneGraph.h"
-#include "audio/audio.h"
+#include "audio/audioDataBlock.h"
 #include "game/fx/particleEngine.h"
 #include "math/mathIO.h"
 #include "dgl/materialPropertyMap.h"
diff -Nur torque_head/engine/game/vehicles/vehicle.cc ../Code/Gaming/torque_head/engine/game/vehicles/vehicle.cc
--- torque_head/engine/game/vehicles/vehicle.cc	2003-08-04 18:26:47.000000000 -0400
+++ ../Code/Gaming/torque_head/engine/game/vehicles/vehicle.cc	2003-08-17 09:18:23.000000000 -0400
@@ -20,7 +20,7 @@
 #include "game/gameConnection.h"
 #include "ts/tsShapeInstance.h"
 #include "game/fx/particleEngine.h"
-#include "audio/audio.h"
+#include "audio/audioDataBlock.h"
 #include "math/mathIO.h"
 #include "sceneGraph/sceneState.h"
 #include "terrain/terrData.h"
diff -Nur torque_head/engine/game/vehicles/wheeledVehicle.cc ../Code/Gaming/torque_head/engine/game/vehicles/wheeledVehicle.cc
--- torque_head/engine/game/vehicles/wheeledVehicle.cc	2003-08-04 18:26:47.000000000 -0400
+++ ../Code/Gaming/torque_head/engine/game/vehicles/wheeledVehicle.cc	2003-08-17 09:18:39.000000000 -0400
@@ -21,7 +21,7 @@
 #include "game/gameConnection.h"
 #include "ts/tsShapeInstance.h"
 #include "game/fx/particleEngine.h"
-#include "audio/audio.h"
+#include "audio/audioDataBlock.h"
 #include "sceneGraph/sceneGraph.h"
 #include "sim/decalManager.h"
 #include "dgl/materialPropertyMap.h"
diff -Nur torque_head/engine/interior/pathedInterior.h ../Code/Gaming/torque_head/engine/interior/pathedInterior.h
--- torque_head/engine/interior/pathedInterior.h	2003-08-04 18:26:48.000000000 -0400
+++ ../Code/Gaming/torque_head/engine/interior/pathedInterior.h	2003-08-17 09:19:36.000000000 -0400
@@ -15,7 +15,7 @@
 #ifndef _INTERIORLMMANAGER_H_
 #include "interior/interiorLMManager.h"
 #endif
-#include "audio/audio.h"
+#include "audio/audioDataBlock.h"
 
 class InteriorInstance;
 class EditGeometry;
Page«First 1 2 Next»