Compiling against DXUT

    This site uses cookies. By continuing to browse this site, you are agreeing to our Cookie Policy.

    • Compiling against DXUT

      Hi
      I'm trying to compile the code using VS2010 (I know 2008 was bad I'm sorry!), boost 1.40 and DirectX (February 2010).

      The DX10 library provided compiles but then linking for editor and teapotwars fails with unresolved symbols. My guess is that because the DXUT supplied doesn't match the DX libraries I have it doesn't work properly. But I was just checking for confirmation?

      Here's some of the output:

      1>TeapotStates.obj : error LNK2019: unresolved external symbol _D3DXVec3Normalize@8 referenced in function "public: class Vec3 * __thiscall Vec3::Normalize(void)" (?Normalize@Vec3@@QAEPAV1@XZ)
      1>TeapotWars.obj : error LNK2001: unresolved external symbol _D3DXVec3Normalize@8
      1>gamecode3d.lib(CMath.obj) : error LNK2001: unresolved external symbol _D3DXVec3Normalize@8
      1>gamecode3d.lib(SceneNodes.obj) : error LNK2001: unresolved external symbol _D3DXVec3Normalize@8
      1>TeapotWars.obj : error LNK2019: unresolved external symbol _D3DXMatrixRotationX@8 referenced in function "public: void __thiscall Mat4x4::BuildRotationX(float)" (?BuildRotationX@Mat4x4@@QAEXM@Z)
      1>gamecode3d.lib(SceneNodes.obj) : error LNK2001: unresolved external symbol _D3DXMatrixRotationX@8
      1>TeapotWars.obj : error LNK2019: unresolved external symbol _D3DXMatrixRotationY@8 referenced in function "public: void __thiscall Mat4x4::BuildRotationY(float)" (?BuildRotationY@Mat4x4@@QAEXM@Z)
      1>gamecode3d.lib(SceneNodes.obj) : error LNK2001: unresolved external symbol _D3DXMatrixRotationY@8
      1>TeapotWars.obj : error LNK2019: unresolved external symbol _D3DXVec4Transform@12 referenced in function "public: class Vec4 __thiscall Mat4x4::Xform(class Vec4 &)const " (?Xform@Mat4x4@@QBE?AVVec4@@AAV2@@Z)
      1>gamecode3d.lib(SceneNodes.obj) : error LNK2001: unresolved external symbol _D3DXVec4Transform@12
      1>dxut10d.lib(DXUTgui.obj) : error LNK2019: unresolved external symbol _D3DXCreateSprite@8 referenced in function "public: long __thiscall CDXUTDialogResourceManager::OnD3D9CreateDevice(struct IDirect3DDevice9 *)" (?OnD3D9CreateDevice@CDXUTDialogResourceManager@@QAEJPAUIDirect3DDevice9@@@Z)
      1>gamecode3d.lib(GameCode.obj) : error LNK2001: unresolved external symbol _D3DXCreateSprite@8
      1>dxut10d.lib(DXUTgui.obj) : error LNK2019: unresolved external symbol _D3DX10CreateEffectFromMemory@56 referenced in function "public: long __thiscall CDXUTDialogResourceManager::OnD3D10CreateDevice(struct ID3D10Device *)" (?OnD3D10CreateDevice@CDXUTDialogResourceManager@@QAEJPAUID3D10Device@@@Z)

      Thankyou in advance.
      Iain
    • Hmmmm, it looks like you're linking in the DX10 libs while attempting to instantiate older interface versions. Perhaps they stripped that stuff out of the old DX10 libs? I know at Slipgate we had two different DirectX builds; one for D3D9-based machines and one for D3D10-based machines. Try linking against the D3D9 libs and see if that helps.

      Incidentally, GCC3 is completely untested in Visual Studio 2010. ;) I just got a 90 day trial through my work so I'll probably give it a go in the next few days. I just have to make sure they're okay with me using it for personal stuff (I've been doing iPhone games lately, so my life is xcode).

      -Rez