【问题标题】:DirectShow Compile issueDirectShow 编译问题
【发布时间】:2012-08-21 05:29:46
【问题描述】:

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

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 ==========

【问题讨论】:

    标签: c++ windows directshow


    【解决方案1】:

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

    #pragma comment(lib, "ole32.lib")
    #pragma comment(lib, "oleaut32.lib")
    

    【讨论】:

    • @vevin:如果这个答案帮助你解决了你的问题,你应该点击投票按钮正下方的勾号来接受它(如果可以的话,请投票)。
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2017-08-12
    • 1970-01-01
    • 1970-01-01
    • 2010-11-26
    • 2020-04-03
    • 2010-10-04
    相关资源
    最近更新 更多