DirectShow编译问题

And*_*neo 2 c++ windows directshow

我正在 64 位平台和 Windows SDKv 7.1 上使用 vs2010。我为 64 位平台构建了基类并在我的项目中进行了配置。但我面临以下问题。我正在尝试连接 Logitech 910 HD 摄像头。

1>LogitechC910Interface.obj : error LNK2001: unresolved external symbol __imp_VariantClear
1>LogitechC910Interface.obj : error LNK2001: unresolved external symbol __imp_CoCreateInstance
1>LogitechC910Interface.obj : error LNK2001: unresolved external symbol __imp_CoUninitialize
1>LogitechC910Interface.obj : error LNK2001: unresolved external symbol __imp_VariantInit
1>LogitechC910Interface.obj : error LNK2001: unresolved external symbol __imp_CoInitializeEx
1>C:\PMD\windows\windows64bit\PMDSDK\examples\Release\simple.exe : fatal error LNK1120: 5 unresolved externals
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========
Run Code Online (Sandbox Code Playgroud)

Rom*_* R. 5

您需要检查项目设置以确保链接器使用各自的.LIB方式找到未解析的符号。对于您提到的那些,您需要ole32.liboleaut32.lib。或者添加到源代码中(而不是项目设置):

#pragma comment(lib, "ole32.lib")
#pragma comment(lib, "oleaut32.lib")
Run Code Online (Sandbox Code Playgroud)