Hey guys, I've just finished doing d3dx9.h, d3dx9core.h, and d3dx9tex.h. Things seem to go along well enough during the compile, but when it links I get



d3dx9.lib(cline.obj) : error LNK2001: unresolved external symbol _IID_IUnknown
d3dx9.lib(cconstanttable.obj) : error LNK2001: unresolved external symbol _IID_IUnknown
d3dx9.lib(cbuffer.obj) : error LNK2001: unresolved external symbol _IID_IUnknown
d3dx9.lib(cfont.obj) : error LNK2001: unresolved external symbol _IID_IUnknown
d3dx9.lib(csprite.obj) : error LNK2001: unresolved external symbol _IID_IUnknown
d3dx9.lib(crendertosurface.obj) : error LNK2001: unresolved external symbol _IID_IUnknown
d3dx9.lib(crendertoenvmap.obj) : error LNK2001: unresolved external symbol _IID_IUnknown
Test.exe : fatal error LNK1120: 1 unresolved externals

Make error(s) occured.



Am I missing something here? Could someone explain why d3d9.lib has no problems with IUnknown? I'd assume since everything COM is derived from it that d3d9.lib would have whatever problems d3dx9 is having, but it works just fine. I couldn't find any information on the board about this (all of the d3dx linking problems I saw were with libs from visual studio). Thanks for any help.
Posted on 2003-06-13 06:20:04 by AlexEiffel
Thats possibly because you are using libs from MASM32 V8? All these IID_xxx are missing there. Use the old libraries (UUID.LIB) or the one from SDK. Or define IID_IUnknown in your code, value is {00000000-0000-0000-C000-000000000046} (not as string, as GUID 16 bytes long!)
Posted on 2003-06-13 10:02:54 by japheth
Thanks for the suggestions japheth. I first tried making an instance of the GUID like this



IID_IUnknown GUID { 00000000h, 0000h, 0000h, {00h, 00h, 00h, 00h, 00h, 46h}}


But I still get the same error. I'm not sure what library you are saying to use from the SDK. The only MASM32 lib I am using is advapi32 (other than the normal kernel32, gdi32, and user32). Is advapi32 the one I need to replace? If I want to just make an instance of the GUID, do I have to extern it or anything like that? Thanks again.
Posted on 2003-06-13 15:37:12 by AlexEiffel
If you really want to make the definition by yourself code:

public IID_IUnknown
IID_IUnknown GUID { 00000000h, 0000h, 0000h, {0C0h, 00h, 00h, 00h, 00h, 00h, 00h, 46h}}
Posted on 2003-06-14 05:45:51 by japheth