[Fixed]IUnknown ambiguous symbol

You discovered a bug in the engine, and you are sure that it is not a problem of your code? Just post it in here. Please read the bug posting guidelines first.
Post Reply
Pr3t3nd3r
Posts: 186
Joined: Tue Feb 08, 2005 6:02 pm
Location: Romania
Contact:

[Fixed]IUnknown ambiguous symbol

Post by Pr3t3nd3r »

Plz rename IUnknown to IrrUnknown or somethink ....

I was geting error about this all the time and was forced to use every time irr::core:: ...etc because trying to use namespace get me error
I was also using the include file localy "irrlicht/irrlicht.h"...
I tried today to use <irrlicht.h> and i lose all day trying to fix this ambiguity ... with no result (i fixed in some files but in some is still not working ...).
I get error's like this:

Code: Select all

p:\Microsoft Visual Studio\PlatformSDK\Include\Unknwn.h(48) : warning C4099: 'irr::IUnknown' : type name first seen using 'class' now seen using 'struct'
        w:\Encounters3D\Irrlitch\irrlicht-0.11.0\source\Irrlicht\include\IUnknown.h(42) : see declaration of 'irr::IUnknown'
p:\Microsoft Visual Studio\PlatformSDK\Include\Unknwn.h(97) : error C2872: 'IUnknown' : ambiguous symbol
        could be 'p:\Microsoft Visual Studio\PlatformSDK\Include\Unknwn.h(48) : irr::IUnknown IUnknown'
        or       'w:\GALACTICDREAM\Irrlitch\irrlicht-0.11.0\source\Irrlicht\include\IUnknown.h(42) : irr::IUnknown'
p:\Microsoft Visual Studio\PlatformSDK\Include\Unknwn.h(110) : fatal error C1903: unable to recover from previous error(s); stopping compilation
listau.cpp
( i think windows.h or winsock2.h is include Unknwn.h what have IUnknown ... same name ... )

And i give up :( and changed the name of the class to IrrUnknown... using SCR
http://www.soft-central.net/scr.php

and now is working fine ... no more ambiguity
Last edited by Pr3t3nd3r on Sat Jul 23, 2005 8:57 pm, edited 1 time in total.
etcaptor
Posts: 871
Joined: Fri Apr 09, 2004 10:32 pm
Location: Valhalla
Contact:

Post by etcaptor »

I don't know wheter will be helpful for you, because I use C++Builder, but with C++Builder I avoid using of Irrlicht namespaces in .h files, I use it only in .cpp files.
ImageImage
Site development -Rock and metal online
--- etcaptor.com ------freenetlife.com
Post Reply