解决问题-未解决的外部符号MFCreateDXGIDeviceManagerv



我想使用Media Foundation转换库捕获视频。

我用过

HRESULT hr = S_OK;
D3D_FEATURE_LEVEL FeatureLevel;
ID3D11DeviceContext* pDX11DeviceContext;
hr = CreateDX11Device(&g_pDX11Device, &pDX11DeviceContext, &FeatureLevel);

if (SUCCEEDED(hr))
{
    hr = MFCreateDXGIDeviceManager(&g_ResetToken, &g_pDXGIMan);
}

在构建vcpp应用程序时,我收到错误:

unresolved external symbol MFCreateDXGIDeviceManagerv

为此,我使用了

#pragma comment(lib, "mf") // For MFEnumDevices
#pragma comment(lib, "mfplat")
#pragma comment(lib, "mfreadwrite")
#pragma comment(lib, "dxva2")
#pragma comment(lib, "d3d11")
#pragma comment(lib, "mfuuid")

以包括与MFCreateDXGIDeviceManagerv相关的库。但我还是犯了同样的错误。请提出解决方案。

MFCreateDXGIDeviceManager在Windows 7上位于MshtmlMedia.dll中,在Windows 8及更高版本上位于MFPlat.dll中。

最新更新