Using DirectMusic with Irrlicht?

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
Dark_Exodus
Posts: 23
Joined: Thu Jan 29, 2004 4:07 pm
Location: Birmingham, UK
Contact:

Using DirectMusic with Irrlicht?

Post by Dark_Exodus »

Hi

I've been having problems trying to get DirectMusic to work with Irrlicht. I've created a music class that compiles ok with no errors, only when I include the Header file into another .cpp file that uses the Irrlicht header file, I get like 104 errors :roll:

Is there a compatibility issue or am I just doing something wrong.
bappy
Posts: 63
Joined: Fri Dec 12, 2003 10:49 am
Location: france
Contact:

Post by bappy »

i had the same problem when went to use direct show.
there is a conflict with the IUnknown class because directx use a class name IUnknown to.
so i have change all the unknown to unknown1 in irrlircht source and recompile the source code of irrlicht to recreate a new dll and lib, after that , no problem because irrlicht use IUnknown1, but i must recompile the source code with this trick every new version... someone maybe have another tips?
-----------------------------
Sans danger, pas de gloire...
http;//bappy.free.fr
-----------------------------
pheadbaq
Posts: 33
Joined: Wed Dec 31, 2003 4:41 pm
Contact:

Could you use namespaces instead?

Post by pheadbaq »

bappy, could this be resolved by referencing the IUnknown class as "irr::IUnknown"? I wouldn't think the DirectMusic class libs would have an irr namespace also. If you could do that it would save from having to modify/recompile the entire Irrlicht source. I could be wrong :( , but that sounds like it would work to me.
Pronunciation: 'feedback' ;)
saigumi
Posts: 921
Joined: Fri Aug 22, 2003 11:31 am
Location: St. Louis, MO USA
Contact:

Post by saigumi »

Or... the solution that requires no core changes to Irrlicht:

Don't use namespaces. The namespaces cause this confusion in which IUnknown to use.

Code: Select all

using namespace irr;

using namespace core;
using namespace scene;
using namespace video;
using namespace io;
using namespace gui;
Remove all of those. You will have to start referencing all elements by the full path. vector3df become irr::core::vector3df
Crud, how do I do this again?
bappy
Posts: 63
Joined: Fri Dec 12, 2003 10:49 am
Location: france
Contact:

Post by bappy »

well , i prefer use namespace instead of using long path and recompile the source one time (it take me 30 sec to change all IUnknown and recompile it).
by the way , at each new release i recompile the lib to have visual 7 optimisation so... doesnt matter to me 8)
-----------------------------
Sans danger, pas de gloire...
http;//bappy.free.fr
-----------------------------
Dark_Exodus
Posts: 23
Joined: Thu Jan 29, 2004 4:07 pm
Location: Birmingham, UK
Contact:

Post by Dark_Exodus »

Ok guys thanks for that. :D
I might just take out the namespaces.
Post Reply