I am trying to use some directshow stuff in my game and so i have included the directx headers. i am getting masses of these ambiguos symbol errors
c:\program files\microsoft visual studio 8\vc\platformsdk\include\ocidl.h(393) : error C2872: 'IUnknown' : ambiguous symbol
could be 'c:\program files\microsoft visual studio 8\vc\platformsdk\include\unknwn.h(110) : IUnknown'
or 'c:\irrlicht-1.0\include\iunknown.h(42) : irr::IUnknown'
I realise that it is the IUknown base classes defined by both DX and Irrlicht clashing, my question is how do i stop it happening!?
I assume this could be resolved throught the use of the namespaces but I haven't found a way of doing so yet. I have had similar problems before which have usually been solved by a reordering of include directories or headers, so i don't know if the following info is any use?
this is the includes and using directives at the top of the file causeing the problem:
#include <dshow.h>
#include <mmstream.h>
#include <amstream.h>
#include <ddstream.h>
#include <irrlicht.h>
using namespace irr;
my include and library directories are in the following order in the properties:
DX
OGL
Irrlicht
SDL
Any suggestions would really be appreciated.
DirectX IUknown ambiguous symbol error
-
funcdoobiest
- Posts: 48
- Joined: Thu Jun 15, 2006 6:35 pm
Thanks hybrid, i had given up on the reordering of includes as it didn't seem to work but I had another go when I realised I had rather lazily being ignoring the file the errors were being genereated from, it wasn't in any of the files I had assumed but in my main.cpp.
It seemed to be caused by including my header after other ones that, except for Irrlicht.h, only include FMod files.
So not 100% sure what was causing it specifically but thanks again.
It seemed to be caused by including my header after other ones that, except for Irrlicht.h, only include FMod files.
So not 100% sure what was causing it specifically but thanks again.