Page 1 of 1

CDemo.h:65: error: ‘audio’ has not been declared

Posted: Thu Nov 29, 2007 6:53 am
by guardian1372
Hi all...

Unfortunatly I am a n00b when it comes to C++ I am a java dev, but am forcing myself to learn C++ just for a project I'm working on that will need Irrlicht....

when I try to compile the CDemo (in the examples directory) I get the error

Code: Select all

CDemo.h:65: error: ‘audio’ has not been declared
I have downloaded the IrrKlang engine, and I have added this to the Cdemo makefile:

Code: Select all

CPPFLAGS = -I/home/guardian/src/irrKlang-1.0.2/include -I../../include -I/usr/X11R6/include
I am using Linux...

I have seen this error in another post, but that mentions a missing header file... my error does not mention that.

I've spent 2 full days (8 hours a day) working on this, but nothign I try seem to get it to work, and I know its because of my lack of C++

Full output:

Code: Select all

guardian@deepthought:~/src/irrlicht-1.3.1/examples/Demo$ make
g++ -O3 -ffast-math -I/home/guardian/src/irrKlang-1.0.2/include -I../../include -I/usr/X11R6/include  -c -o CDemo.o CDemo.cpp
CDemo.h:65: error: ‘audio’ has not been declared
CDemo.h:65: error: ISO C++ forbids declaration of ‘ISoundEngine’ with no type
CDemo.h:65: error: expected ‘;’ before ‘*’ token
CDemo.h:66: error: ‘audio’ has not been declared
CDemo.h:66: error: ISO C++ forbids declaration of ‘ISoundSource’ with no type
CDemo.h:66: error: expected ‘;’ before ‘*’ token
CDemo.h:67: error: ‘audio’ has not been declared
CDemo.h:67: error: ISO C++ forbids declaration of ‘ISoundSource’ with no type
CDemo.h:67: error: expected ‘;’ before ‘*’ token
CDemo.cpp: In constructor ‘CDemo::CDemo(bool, bool, bool, bool, bool, irr::video::E_DRIVER_TYPE)’:
CDemo.cpp:14: error: ‘irrKlang’ was not declared in this scope
CDemo.cpp: In destructor ‘virtual CDemo::~CDemo()’:
CDemo.cpp:28: error: ‘irrKlang’ was not declared in this scope
CDemo.cpp: In member function ‘void CDemo::run()’:
CDemo.cpp:74: error: ‘irrKlang’ was not declared in this scope
CDemo.cpp: In member function ‘void CDemo::shoot()’:
CDemo.cpp:670: error: ‘ballSound’ was not declared in this scope
CDemo.cpp:671: error: ‘irrKlang’ was not declared in this scope
CDemo.cpp: In member function ‘void CDemo::createParticleImpacts()’:
CDemo.cpp:718: error: ‘irrKlang’ was not declared in this scope
CDemo.cpp:720: error: ‘audio’ has not been declared
CDemo.cpp:720: error: ‘sound’ was not declared in this scope
CDemo.cpp:721: error: ‘impactSound’ was not declared in this scope
CDemo.cpp: In member function ‘void CDemo::startIrrKlang()’:
CDemo.cpp:748: error: ‘irrKlang’ was not declared in this scope
CDemo.cpp:748: error: ‘audio’ has not been declared
CDemo.cpp:755: error: ‘audio’ has not been declared
CDemo.cpp:755: error: ‘snd’ was not declared in this scope
CDemo.cpp:767: error: ‘ballSound’ was not declared in this scope
CDemo.cpp:768: error: ‘impactSound’ was not declared in this scope
make: *** [CDemo.o] Error 1
[/code]

Posted: Thu Nov 29, 2007 8:53 am
by hybrid
I think the namespaces etc. have changed. You wither have to use an older irrKlang version or update to the very latest SVN revisions of the 1.4 branch where Niko made some changes to the Demo:
http://irrlicht.svn.sourceforge.net/vie ... ision=1071

Posted: Thu Nov 29, 2007 5:40 pm
by ultran00b
If you are a Java dev, use jIrr, the Java wrapper for Irrlicht.

Posted: Thu Nov 29, 2007 8:18 pm
by guardian1372
Thanks for the info.. I'll give that a shot tonight!

ultran00b, I did have a think about the java wrapper, but it just adds another layer of complication... when reading howtos etc I'd have to figure out how to "translate" everything....


good idea tho :)

Posted: Sat Dec 01, 2007 7:38 am
by guardian1372
using the older version of irrKlang worked like a charm.. thanks guys!