我试图使用此链接: http: //msdn.microsoft.com/en-us/library/dd377566%28v=VS.85%29.aspx来选择捕获设备。
在 Visual Studio 上完美运行,但抛出以下错误 QT:
test.obj : error LNK2005: _main already defined in main.obj
test.obj : error LNK2019: unresolved external symbol __imp__CoCreateInstance@20 referenced in function "long __cdecl EnumerateDevices(struct _GUID const &,struct IEnumMoniker * *)" (?EnumerateDevices@@YAJABU_GUID@@PAPAUIEnumMoniker@@@Z)
test.obj : error LNK2019: unresolved external symbol __imp__VariantClear@4 referenced in function "void __cdecl DisplayDeviceInformation(struct IEnumMoniker *)" (?DisplayDeviceInformation@@YAXPAUIEnumMoniker@@@Z)
test.obj : error LNK2019: unresolved external symbol __imp__VariantInit@4 referenced in function "void __cdecl DisplayDeviceInformation(struct IEnumMoniker *)" (?DisplayDeviceInformation@@YAXPAUIEnumMoniker@@@Z)
test.obj : error LNK2019: unresolved external symbol __imp__CoUninitialize@0 referenced in function _main
test.obj : error LNK2019: unresolved external symbol __imp__CoInitializeEx@8 referenced in function _main
我正在使用 Windows 7 和 QT 5.0.2。
任何帮助将不胜感激。