1

我正在尝试按照https://github.com/obsproject/obs-studio/wiki/Install-Instructions#windows-build-directions上的官方步骤来构建obs-studio

我使用cmake GUI 生成 Visual Studio 项目。当我尝试在 Visual Studio 中构建项目时,我收到了这些错误

Severity    Code    Description Project File    Line    Suppression State
Error   C2039   'IsCursorCaptureEnabled': is not a member of 'winrt::Windows::Graphics::Capture::GraphicsCaptureSession'    libobs-winrt    C:\Users\alokm\obs-studio\libobs-winrt\winrt-capture.cpp    290 

Error   C2039   'IsCursorCaptureEnabled': is not a member of 'winrt::Windows::Graphics::Capture::GraphicsCaptureSession'    libobs-winrt    C:\Users\alokm\obs-studio\libobs-winrt\winrt-capture.cpp    372 

Error   C2039   'IsCursorCaptureEnabled': is not a member of 'winrt::Windows::Graphics::Capture::GraphicsCaptureSession'    libobs-winrt    C:\Users\alokm\obs-studio\libobs-winrt\winrt-capture.cpp    473 

我该如何解决这些错误?

这是我的 Visual Studio 详细信息

Microsoft Visual Studio Community 2019
Version 16.8.4
VisualStudio.16.Release/16.8.4+30907.101
Microsoft .NET Framework
Version 4.8.04084

Installed Version: Community

Visual C++ 2019   00435-60000-00000-AA868
Microsoft Visual C++ 2019

ASP.NET and Web Tools 2019   16.8.557.25636
ASP.NET and Web Tools 2019

Azure App Service Tools v3.0.0   16.8.557.25636
Azure App Service Tools v3.0.0

C# Tools   3.8.0-5.20604.10+9ed4b774d20940880de8df1ca8b07508aa01c8cd
C# components used in the IDE. Depending on your project type and settings, a different version of the compiler may be used.

Common Azure Tools   1.10
Provides common services for use by Azure Mobile Services and Microsoft Azure Tools.

IntelliCode Extension   1.0
IntelliCode Visual Studio Extension Detailed Info

Microsoft JVM Debugger   1.0
Provides support for connecting the Visual Studio debugger to JDWP compatible Java Virtual Machines

Microsoft MI-Based Debugger   1.0
Provides support for connecting Visual Studio to MI compatible debuggers

Microsoft Visual C++ Wizards   1.0
Microsoft Visual C++ Wizards

Microsoft Visual Studio VC Package   1.0
Microsoft Visual Studio VC Package

NuGet Package Manager   5.8.1
NuGet Package Manager in Visual Studio. For more information about NuGet, visit https://docs.nuget.org/

ProjectServicesPackage Extension   1.0
ProjectServicesPackage Visual Studio Extension Detailed Info

Test Adapter for Boost.Test   1.0
Enables Visual Studio's testing tools with unit tests written for Boost.Test.  The use terms and Third Party Notices are available in the extension installation directory.

Test Adapter for Google Test   1.0
Enables Visual Studio's testing tools with unit tests written for Google Test.  The use terms and Third Party Notices are available in the extension installation directory.

Visual Basic Tools   3.8.0-5.20604.10+9ed4b774d20940880de8df1ca8b07508aa01c8cd
Visual Basic components used in the IDE. Depending on your project type and settings, a different version of the compiler may be used.

Visual C++ for Linux Development   1.0.9.30608
Visual C++ for Linux Development

Visual F# Tools   16.8.0-beta.20507.4+da6be68280c89131cdba2045525b80890401defd
Microsoft Visual F# Tools

Visual Studio Code Debug Adapter Host Package   1.0
Interop layer for hosting Visual Studio Code debug adapters in Visual Studio

Visual Studio Tools for CMake   1.0
Visual Studio Tools for CMake
4

1 回答 1

0

更新 Windows SDK 并删除过时的版本正在解决所有错误。

在 Visual Studio 中打开Tools>> 使用“Windows SDK”搜索,然后选择最新Get Tools and Features版本并取消选择旧版本,然后单击。Individual components
Windows 10 SDKmodify

在此处输入图像描述

于 2021-01-14T14:34:49.937 回答