Game Development Community

D3DPRESENT_PARAMETERS LINK FAIL with "/Clr"

by ccljyc · in Torque Game Engine Advanced · 06/19/2009 (3:32 am) · 2 replies

I want to add .NET support but I got this link fail.
How can I do?
Thx.
error LNK2022: metadata operation failed (8013118D) : 重複型別中不一致的配置資訊 (_D3DPRESENT_PARAMETERS_): (0x02000256)。	gfxD3D8Target.obj	ARPG_TEST
d3d8types.h
typedef struct _D3DPRESENT_PARAMETERS_
{
    UINT                BackBufferWidth;
    UINT                BackBufferHeight;
    D3DFORMAT           BackBufferFormat;
    UINT                BackBufferCount;
    D3DMULTISAMPLE_TYPE MultiSampleType;
    D3DSWAPEFFECT       SwapEffect;
    HWND                hDeviceWindow;
    BOOL                Windowed;
    BOOL                EnableAutoDepthStencil;
    D3DFORMAT           AutoDepthStencilFormat;
    DWORD               Flags;
    /* Following elements must be zero for Windowed mode */
    UINT                FullScreen_RefreshRateInHz;
    UINT                FullScreen_PresentationInterval;
} D3DPRESENT_PARAMETERS;
d3d9types.h
typedef struct _D3DPRESENT_PARAMETERS_
{
    UINT                BackBufferWidth;
    UINT                BackBufferHeight;
    D3DFORMAT           BackBufferFormat;
    UINT                BackBufferCount;
    D3DMULTISAMPLE_TYPE MultiSampleType;
    DWORD               MultiSampleQuality; // DX9 
    D3DSWAPEFFECT       SwapEffect;
    HWND                hDeviceWindow;
    BOOL                Windowed;
    BOOL                EnableAutoDepthStencil;
    D3DFORMAT           AutoDepthStencilFormat;
    DWORD               Flags;
    /* FullScreen_RefreshRateInHz must be zero for Windowed mode */
    UINT                FullScreen_RefreshRateInHz;
    UINT                PresentationInterval;
} D3DPRESENT_PARAMETERS;

#1
06/21/2009 (2:35 pm)

Don't know what actually is going on there, but for a quick fix, maybe removing the DX8 graphics layer will do the trick (if you don't need it; usually there's no reason to go back beyond DX9). Just remove all the gfx/d3d8/* files from the project.

The linker problem was with gfxD3D8Target.cpp, so maybe everything works fine with the D3D9 layer.

Hope this helps.
#2
06/21/2009 (8:30 pm)
Thank you very much!
I used TGEA 1.7.1 and Link successful.
The advenced camera function fail and have to debug myself.