gpt4 book ai didi

c++ - 在 Windows 10 上构建 Vivek 的虚拟相机时出现链接器错误?

转载 作者:行者123 更新时间:2023-12-03 10:05:13 27 4
gpt4 key购买 nike

我正在尝试构建 Vivek's Virtual Camera在 Windows 10 上。
为此,我需要 Win7Samples/multimedia/directshow/baseclasses
我已下载 baseclasses并使用 Visual Studio 2019 构建它。
现在我准备构建虚拟相机过滤器。我遵循了一些必要的步骤

  • git clone https://github.com/roman380/tmhare.mvps.org-vcam
  • cd tmhare.mvps.org-vcam\Filters
  • 然后我尝试打开Filters.dsp在 Visual Studio 2019 中,它要求我做 one-way upgrade enter image description here
  • 已添加 C:\Users\alokm\tmp\Windows-classic-samples\Samples\Win7Samples\multimedia\directshow\baseclassesAdditional Include Directories enter image description here
  • 已添加 C:\Users\alokm\tmp\Windows-classic-samples\Samples\Win7Samples\multimedia\directshow\baseclasses\DebugAddition Library Directories enter image description here
  • 在所有这些步骤之后,我尝试通过点击 Build 来构建。 >> Build Solution但是我收到了很多链接器错误。
    enter image description here

  • 文本格式错误:
    Severity    Code    Description Project File    Line    Suppression State
    Error LNK2001 unresolved external symbol _memcmp Filters C:\Users\alokm\tmp\tmhare.mvps.org-vcam\Filters\strmbasd.lib(combase.obj) 1
    Error LNK2001 unresolved external symbol _memcmp Filters C:\Users\alokm\tmp\tmhare.mvps.org-vcam\Filters\strmbasd.lib(mtype.obj) 1
    Error LNK2001 unresolved external symbol _memcmp Filters C:\Users\alokm\tmp\tmhare.mvps.org-vcam\Filters\strmbasd.lib(amfilter.obj) 1
    Error LNK2001 unresolved external symbol _memcmp Filters C:\Users\alokm\tmp\tmhare.mvps.org-vcam\Filters\Filters.obj 1
    Error LNK2001 unresolved external symbol _memcmp Filters C:\Users\alokm\tmp\tmhare.mvps.org-vcam\Filters\strmbasd.lib(dllentry.obj) 1
    Error LNK2001 unresolved external symbol _memcmp Filters C:\Users\alokm\tmp\tmhare.mvps.org-vcam\Filters\strmbasd.lib(wxdebug.obj) 1
    Error LNK2001 unresolved external symbol _memcmp Filters C:\Users\alokm\tmp\tmhare.mvps.org-vcam\Filters\strmbasd.lib(amvideo.obj) 1
    Error LNK2019 unresolved external symbol _memset referenced in function "public: virtual long __thiscall CVCamStream::GetMediaType(int,class CMediaType *)" (?GetMediaType@CVCamStream@@UAEJHPAVCMediaType@@@Z) Filters C:\Users\alokm\tmp\tmhare.mvps.org-vcam\Filters\Filters.obj 1
    Error LNK2001 unresolved external symbol _memset Filters C:\Users\alokm\tmp\tmhare.mvps.org-vcam\Filters\strmbasd.lib(wxdebug.obj) 1
    Error LNK2001 unresolved external symbol _memset Filters C:\Users\alokm\tmp\tmhare.mvps.org-vcam\Filters\strmbasd.lib(mtype.obj) 1
    Error LNK2001 unresolved external symbol _memset Filters C:\Users\alokm\tmp\tmhare.mvps.org-vcam\Filters\strmbasd.lib(amfilter.obj) 1
    Error LNK2019 unresolved external symbol __imp__rand referenced in function "public: virtual long __thiscall CVCamStream::FillBuffer(struct IMediaSample *)" (?FillBuffer@CVCamStream@@UAEJPAUIMediaSample@@@Z) Filters C:\Users\alokm\tmp\tmhare.mvps.org-vcam\Filters\Filters.obj 1
    Error LNK2001 unresolved external symbol ___CxxFrameHandler3 Filters C:\Users\alokm\tmp\tmhare.mvps.org-vcam\Filters\strmbasd.lib(mtype.obj) 1
    Error LNK2001 unresolved external symbol ___CxxFrameHandler3 Filters C:\Users\alokm\tmp\tmhare.mvps.org-vcam\Filters\strmbasd.lib(amfilter.obj) 1
    Error LNK2001 unresolved external symbol ___CxxFrameHandler3 Filters C:\Users\alokm\tmp\tmhare.mvps.org-vcam\Filters\strmbasd.lib(source.obj) 1
    Error LNK2001 unresolved external symbol ___CxxFrameHandler3 Filters C:\Users\alokm\tmp\tmhare.mvps.org-vcam\Filters\strmbasd.lib(wxlist.obj) 1
    Error LNK2001 unresolved external symbol ___CxxFrameHandler3 Filters C:\Users\alokm\tmp\tmhare.mvps.org-vcam\Filters\Filters.obj 1
    Error LNK2001 unresolved external symbol ___CxxFrameHandler3 Filters C:\Users\alokm\tmp\tmhare.mvps.org-vcam\Filters\strmbasd.lib(wxdebug.obj) 1
    Error LNK2001 unresolved external symbol ___CxxFrameHandler3 Filters C:\Users\alokm\tmp\tmhare.mvps.org-vcam\Filters\strmbasd.lib(wxutil.obj) 1
    Error LNK2001 unresolved external symbol ___CxxFrameHandler3 Filters C:\Users\alokm\tmp\tmhare.mvps.org-vcam\Filters\strmbasd.lib(combase.obj) 1
    Error LNK2019 unresolved external symbol _wcsrchr referenced in function "wchar_t * __cdecl wcsrchr(wchar_t *,wchar_t)" (?wcsrchr@@YAPA_WPA_W_W@Z) Filters C:\Users\alokm\tmp\tmhare.mvps.org-vcam\Filters\strmbasd.lib(dllentry.obj) 1
    Error LNK2001 unresolved external symbol _wcsrchr Filters C:\Users\alokm\tmp\tmhare.mvps.org-vcam\Filters\strmbasd.lib(wxdebug.obj) 1
    Error LNK2019 unresolved external symbol __imp____stdio_common_vswprintf referenced in function __vsnwprintf_l Filters C:\Users\alokm\tmp\tmhare.mvps.org-vcam\Filters\strmbasd.lib(dllentry.obj) 1
    Error LNK2001 unresolved external symbol __imp____stdio_common_vswprintf Filters C:\Users\alokm\tmp\tmhare.mvps.org-vcam\Filters\strmbasd.lib(wxdebug.obj) 1
    Error LNK2001 unresolved external symbol __imp____stdio_common_vswprintf Filters C:\Users\alokm\tmp\tmhare.mvps.org-vcam\Filters\strmbasd.lib(dllsetup.obj) 1
    Error LNK2001 unresolved external symbol __imp____stdio_common_vswprintf Filters C:\Users\alokm\tmp\tmhare.mvps.org-vcam\Filters\strmbasd.lib(wxutil.obj) 1
    Error LNK2019 unresolved external symbol __imp____stdio_common_vsprintf referenced in function __vsnprintf_l Filters C:\Users\alokm\tmp\tmhare.mvps.org-vcam\Filters\strmbasd.lib(wxdebug.obj) 1
    Error LNK2019 unresolved external symbol _memcpy referenced in function _AMGetWideString@8 Filters C:\Users\alokm\tmp\tmhare.mvps.org-vcam\Filters\strmbasd.lib(wxutil.obj) 1
    Error LNK2001 unresolved external symbol _memcpy Filters C:\Users\alokm\tmp\tmhare.mvps.org-vcam\Filters\strmbasd.lib(mtype.obj) 1
    Error LNK2001 unresolved external symbol _memcpy Filters C:\Users\alokm\tmp\tmhare.mvps.org-vcam\Filters\strmbasd.lib(amfilter.obj) 1
    Error LNK2001 unresolved external symbol _memcpy Filters C:\Users\alokm\tmp\tmhare.mvps.org-vcam\Filters\strmbasd.lib(source.obj) 1
    Error LNK2001 unresolved external symbol __purecall Filters C:\Users\alokm\tmp\tmhare.mvps.org-vcam\Filters\strmbasd.lib(amfilter.obj) 1
    Error LNK2001 unresolved external symbol __purecall Filters C:\Users\alokm\tmp\tmhare.mvps.org-vcam\Filters\strmbasd.lib(source.obj) 1
    Error LNK2019 unresolved external symbol __imp___wtoi referenced in function "public: virtual long __stdcall CSource::FindPin(wchar_t const *,struct IPin * *)" (?FindPin@CSource@@UAGJPB_WPAPAUIPin@@@Z) Filters C:\Users\alokm\tmp\tmhare.mvps.org-vcam\Filters\strmbasd.lib(source.obj) 1
    Error LNK2019 unresolved external symbol __CrtDbgReport referenced in function __CRT_RTC_INIT Filters C:\Users\alokm\tmp\tmhare.mvps.org-vcam\Filters\MSVCRTD.lib(init.obj) 1
    Error LNK2019 unresolved external symbol __CrtDbgReportW referenced in function __CRT_RTC_INITW Filters C:\Users\alokm\tmp\tmhare.mvps.org-vcam\Filters\MSVCRTD.lib(init.obj) 1
    Error LNK2019 unresolved external symbol __callnewh referenced in function "void * __cdecl operator new(unsigned int)" (??2@YAPAXI@Z) Filters C:\Users\alokm\tmp\tmhare.mvps.org-vcam\Filters\MSVCRTD.lib(new_scalar.obj) 1
    Error LNK2019 unresolved external symbol _malloc referenced in function "void * __cdecl operator new(unsigned int)" (??2@YAPAXI@Z) Filters C:\Users\alokm\tmp\tmhare.mvps.org-vcam\Filters\MSVCRTD.lib(new_scalar.obj) 1
    Error LNK2019 unresolved external symbol _strcpy_s referenced in function "void __cdecl _RTC_StackFailure(void *,char const *)" (?_RTC_StackFailure@@YAXPAXPBD@Z) Filters C:\Users\alokm\tmp\tmhare.mvps.org-vcam\Filters\MSVCRTD.lib(error.obj) 1
    Error LNK2019 unresolved external symbol _strcat_s referenced in function "void __cdecl _RTC_StackFailure(void *,char const *)" (?_RTC_StackFailure@@YAXPAXPBD@Z) Filters C:\Users\alokm\tmp\tmhare.mvps.org-vcam\Filters\MSVCRTD.lib(error.obj) 1
    Error LNK2019 unresolved external symbol ___stdio_common_vsprintf_s referenced in function __vsprintf_s_l Filters C:\Users\alokm\tmp\tmhare.mvps.org-vcam\Filters\MSVCRTD.lib(error.obj) 1
    Error LNK2019 unresolved external symbol ___std_exception_copy referenced in function "public: __thiscall std::exception::exception(class std::exception const &)" (??0exception@std@@QAE@ABV01@@Z) Filters C:\Users\alokm\tmp\tmhare.mvps.org-vcam\Filters\MSVCRTD.lib(throw_bad_alloc.obj) 1
    Error LNK2019 unresolved external symbol ___std_exception_destroy referenced in function "public: virtual __thiscall std::exception::~exception(void)" (??1exception@std@@UAE@XZ) Filters C:\Users\alokm\tmp\tmhare.mvps.org-vcam\Filters\MSVCRTD.lib(throw_bad_alloc.obj) 1
    Error LNK2019 unresolved external symbol __CxxThrowException@8 referenced in function "void __cdecl __scrt_throw_std_bad_alloc(void)" (?__scrt_throw_std_bad_alloc@@YAXXZ) Filters C:\Users\alokm\tmp\tmhare.mvps.org-vcam\Filters\MSVCRTD.lib(throw_bad_alloc.obj) 1
    Error LNK2019 unresolved external symbol __free_dbg referenced in function "void __cdecl operator delete(void *)" (??3@YAXPAX@Z) Filters C:\Users\alokm\tmp\tmhare.mvps.org-vcam\Filters\MSVCRTD.lib(delete_scalar.obj) 1
    Error LNK2019 unresolved external symbol __wmakepath_s referenced in function "int __cdecl GetPdbDllPathFromFilePath(wchar_t const *,wchar_t *,unsigned int)" (?GetPdbDllPathFromFilePath@@YAHPB_WPA_WI@Z) Filters C:\Users\alokm\tmp\tmhare.mvps.org-vcam\Filters\MSVCRTD.lib(pdblkup.obj) 1
    Error LNK2019 unresolved external symbol __wsplitpath_s referenced in function "int __cdecl GetPdbDllPathFromFilePath(wchar_t const *,wchar_t *,unsigned int)" (?GetPdbDllPathFromFilePath@@YAHPB_WPA_WI@Z) Filters C:\Users\alokm\tmp\tmhare.mvps.org-vcam\Filters\MSVCRTD.lib(pdblkup.obj) 1
    Error LNK2019 unresolved external symbol _wcscpy_s referenced in function "int __cdecl GetPdbDllPathFromFilePath(wchar_t const *,wchar_t *,unsigned int)" (?GetPdbDllPathFromFilePath@@YAHPB_WPA_WI@Z) Filters C:\Users\alokm\tmp\tmhare.mvps.org-vcam\Filters\MSVCRTD.lib(pdblkup.obj) 1
    Error LNK2019 unresolved external symbol ___vcrt_GetModuleFileNameW referenced in function "struct HINSTANCE__ * __cdecl GetPdbDll(void)" (?GetPdbDll@@YAPAUHINSTANCE__@@XZ) Filters C:\Users\alokm\tmp\tmhare.mvps.org-vcam\Filters\MSVCRTD.lib(pdblkup.obj) 1
    Error LNK2019 unresolved external symbol ___vcrt_GetModuleHandleW referenced in function "struct HINSTANCE__ * __cdecl GetPdbDll(void)" (?GetPdbDll@@YAPAUHINSTANCE__@@XZ) Filters C:\Users\alokm\tmp\tmhare.mvps.org-vcam\Filters\MSVCRTD.lib(pdblkup.obj) 1
    Error LNK2019 unresolved external symbol ___vcrt_LoadLibraryExW referenced in function "struct HINSTANCE__ * __cdecl GetPdbDll(void)" (?GetPdbDll@@YAPAUHINSTANCE__@@XZ) Filters C:\Users\alokm\tmp\tmhare.mvps.org-vcam\Filters\MSVCRTD.lib(pdblkup.obj) 1
    Error LNK2019 unresolved external symbol _terminate referenced in function __except_handler4_noexcept Filters C:\Users\alokm\tmp\tmhare.mvps.org-vcam\Filters\MSVCRTD.lib(chandler4_noexcept.obj) 1
    Error LNK2019 unresolved external symbol ___current_exception referenced in function __except_handler4_noexcept Filters C:\Users\alokm\tmp\tmhare.mvps.org-vcam\Filters\MSVCRTD.lib(chandler4_noexcept.obj) 1
    Error LNK2019 unresolved external symbol ___current_exception_context referenced in function __except_handler4_noexcept Filters C:\Users\alokm\tmp\tmhare.mvps.org-vcam\Filters\MSVCRTD.lib(chandler4_noexcept.obj) 1
    Error LNK2019 unresolved external symbol __except_handler4_common referenced in function __except_handler4 Filters C:\Users\alokm\tmp\tmhare.mvps.org-vcam\Filters\MSVCRTD.lib(chandler4gs.obj) 1
    Error LNK1120 31 unresolved externals Filters C:\Users\alokm\tmp\tmhare.mvps.org-vcam\Bin\VCamD.ax 1
    我错在哪里?如何使这个工作?

    最佳答案

    构建项目的问题来自于此:

  • 项目源代码依赖于 DirectShow BaseClasses,它不再是 Windows SDK 的一部分
  • 该项目有太多与默认值不同的设置;使用当前的 Visual Studio 会成为一个问题

  • 我更新了 github repository并更改了项目设置以使项目构建(Visual Studio 2019 社区)并运行:大多数 C++ 项目设置已恢复,并且 DirectShow BaseClasses 用于来自 github 的构建配置。
    在那里查看 README.md,按照构建步骤(需要先提取 Windows SDK 示例,然后在那里构建 DirectShow 内容),注册 DLL( regsvr32),最后您将拥有生成带有随机数据的视频的过滤器:

    关于c++ - 在 Windows 10 上构建 Vivek 的虚拟相机时出现链接器错误?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/65750229/

    27 4 0
    Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
    广告合作:1813099741@qq.com 6ren.com