Very odd error upon building my modified Tech Demo.

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
disanti
Posts: 367
Joined: Sat Jan 17, 2004 1:36 am
Location: California, US
Contact:

Very odd error upon building my modified Tech Demo.

Post by disanti »

Code: Select all

--------------------Configuration: Techdemo - Win32 Debug--------------------
Compiling resources...
Compiling...
CDemo.cpp
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'
main.cpp
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'
Error executing cl.exe.

PSS4.exe - 2 error(s), 0 warning(s)
How did this happen? Never happened to me in the past :(

You can download my project here:
http://www.santiproductions.com/files/finalengine.zip

Thanks! I hope I can get this fixed. I spent an hour trying to solve it to no success :(
________
Medical marijuana states
Last edited by disanti on Tue Feb 22, 2011 7:57 am, edited 1 time in total.
keless
Posts: 805
Joined: Mon Dec 15, 2003 10:37 pm
Location: Los Angeles, California, USA

Post by keless »

the problem is a 'namespace collision'

basically STL has a class called 'string' but IrrLicht ALSO has a class called 'string'

it sounds like you're trying to use the stl string, which is found in the std namespace. However, you're already using namespace irr, which means when you type 'string' its not sure if you want the std::string or the irr::string

First of all, I suggest you remove any 'using namespace xxx' statements and simply type out the full namespace in front of all of your variables so stuff like this doesnt happen again. Before you go that far, you can simply make sure you type 'std::' in front of your string declarations.
a screen cap is worth 0x100000 DWORDS
disanti
Posts: 367
Joined: Sat Jan 17, 2004 1:36 am
Location: California, US
Contact:

Post by disanti »

I don't have any string declarations. Thats the problem! :S I just deleted the last string declaration and I'm getting the same errors. What is causing std to be included anyway? I commented out stdio.h in all the sources and it still gives the same errors :(
________
Bmw New Class History
Last edited by disanti on Tue Feb 22, 2011 7:57 am, edited 1 time in total.
disanti
Posts: 367
Joined: Sat Jan 17, 2004 1:36 am
Location: California, US
Contact:

Post by disanti »

Ok, getting rid of the windows headers didn't work either. Is this an Irrlicht problem?
________
Volcano Vaporizers
Last edited by disanti on Tue Feb 22, 2011 7:57 am, edited 1 time in total.
keless
Posts: 805
Joined: Mon Dec 15, 2003 10:37 pm
Location: Los Angeles, California, USA

Post by keless »

i think your project settings in MSVC are automatically adding STD for you
a screen cap is worth 0x100000 DWORDS
disanti
Posts: 367
Joined: Sat Jan 17, 2004 1:36 am
Location: California, US
Contact:

Post by disanti »

Hmmm... it doesn't appear to be, but I'm new to VC++ project settings. This has to be the most pesky error around :P
________
Entourage dicussion
Post Reply