Irrlicht/Audiere compatibility issues.

Discuss about anything related to the Irrlicht Engine, or read announcements about any significant features or usage changes.
Post Reply
disanti
Posts: 367
Joined: Sat Jan 17, 2004 1:36 am
Location: California, US
Contact:

Irrlicht/Audiere compatibility issues.

Post by disanti »

Ok, I've been doing some experimentation and I've found the reason for errors like this:

C:\Program Files\Microsoft Visual Studio\VC98\INCLUDE\xstring(612) : error C2955: 'string' : use of class template requires template argument list
C:\IRRLICHT\INCLUDE\irrString.h(442) : see declaration of 'string'

This only happens if you include "string" or include Audiere into your Irrlicht Project. Audiere includes "string" which includes "xstring" which causes this problem. I'm afraid that because of this, my game won't have sound/music. I'm not exactly sure what in Audiere causes this problem but it happens.

Can I request that string in Irrlicht be renamed to IrrString? I started doing this in the source but it got very tiring. :P

Thanks!
________
HONDA CRF100
Last edited by disanti on Tue Feb 22, 2011 7:59 am, edited 1 time in total.
saigumi
Posts: 921
Joined: Fri Aug 22, 2003 11:31 am
Location: St. Louis, MO USA
Contact:

Post by saigumi »

Are you using namespaces everywhere?

That would be the reason that irr::string and auiere::whatever::string.

Don't use namespaces.
Crud, how do I do this again?
[dx/x]=HUNT3R
Posts: 271
Joined: Sat Aug 23, 2003 5:52 pm
Location: Hurricane Central, Florida

Post by [dx/x]=HUNT3R »

I'm using namespace irr and using namespace audiere and I have never seen the problem...
Ryoga2k
Posts: 21
Joined: Mon May 03, 2004 6:59 pm
Location: Asturias, Spain

Post by Ryoga2k »

A "quick" solution is to avoid the "using namespace core" sentence. In this namespace there is the declaration for the Irrlicht string (conflict with std::string, used by Audiere).

So, it will be neccesary to use the core:: prefix before refer a class found in this namespace.
"There's always a way, if desire meets courage"
Conan of Cimmeria
disanti
Posts: 367
Joined: Sat Jan 17, 2004 1:36 am
Location: California, US
Contact:

Post by disanti »

Wow this is an old post! I fixed that a LONG time ago.
________
MEXICO CITY HOTELS
Last edited by disanti on Thu Feb 24, 2011 10:27 am, edited 1 time in total.
buhatkj
Posts: 444
Joined: Fri Dec 12, 2003 4:53 am
Contact:

i run into this too sometimes...

Post by buhatkj »

yeh i get this too. its cuz i like to use std::strings for stuff. to be perfectly honest i dunno why people write their own string class (ala irrlicht or audiere) or data structures rather than use the STL and std::strings. I hear a lot of crap about the STL being bloated or std::string having un-needed features or being slow, but to be honest I think this is largely over-stated. I use the STL obsessively, and have found it's very stable, and standardized(at least to some degree) across many platforms. I think(this is simply an opinion mind you...) that perhaps the reasoning behind avoiding the STL is some sort of holdover from the C days. I notice a lot of the same people use c-style file IO (seek(), read()...) and like to use things like strcmp() and substr(), also a good number of people like to allocate their own memory and use delete[] on blocks of memory and stuff like that. In "The C++ Programming Language" by Bjarne Stroustup(inventor of c++) he says flat out that he thinks it's safer to use OO style memory management (creators/destructors) than to do it manually. Personally, I think he's right, and i try to fully embrace OO in my code everyplace I can.

On the other hand, John Carmack for instance is known to shrug off OO in favor of doing pretty much straight classic C instead.

So clearly, there is a difference of opinions on this matter. I guess I'll do it my way, and everybody else can decide for themselves ;-)
-Ted
My irrlicht-based projects have gone underground for now, but if you want, check out my webcomic instead! http://brokenboomerang.net
Tyn
Posts: 932
Joined: Thu Nov 20, 2003 7:53 pm
Location: England
Contact:

Post by Tyn »

The reason that Irrlicht uses it's own functions is to make it easier on the user, so that he doesn't have to set up and compile STLPort. It is a pain in the arse if you already have stl set up on your comp, but it is probably sensible to add the namespaces to the Irrlicht classes so that it doesn't clash with anything.
sfncook
Posts: 36
Joined: Sun Jul 01, 2007 6:32 pm

Post by sfncook »

FYI: The C2955 string error is caused by MSVC 6.0. I switched my project to .Net2003 and the error went away.
Post Reply