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

If you are a new Irrlicht Engine user, and have a newbie-question, this is the forum for you. You may also post general programming questions here.
Post Reply
guardian1372
Posts: 5
Joined: Tue Nov 27, 2007 8:23 pm

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

Post 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]
hybrid
Admin
Posts: 14143
Joined: Wed Apr 19, 2006 9:20 pm
Location: Oldenburg(Oldb), Germany
Contact:

Post 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
ultran00b
Posts: 35
Joined: Tue Oct 30, 2007 3:30 pm

Post by ultran00b »

If you are a Java dev, use jIrr, the Java wrapper for Irrlicht.
Use the debugger, young Skywalker...
guardian1372
Posts: 5
Joined: Tue Nov 27, 2007 8:23 pm

Post 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 :)
guardian1372
Posts: 5
Joined: Tue Nov 27, 2007 8:23 pm

Post by guardian1372 »

using the older version of irrKlang worked like a charm.. thanks guys!
Post Reply