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.
Thanks!
________
HONDA CRF100
Irrlicht/Audiere compatibility issues.
Irrlicht/Audiere compatibility issues.
Last edited by disanti on Tue Feb 22, 2011 7:59 am, edited 1 time in total.
-
- Posts: 271
- Joined: Sat Aug 23, 2003 5:52 pm
- Location: Hurricane Central, Florida
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.
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
Conan of Cimmeria
Last edited by disanti on Thu Feb 24, 2011 10:27 am, edited 1 time in total.
i run into this too sometimes...
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
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
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.