obsproject / obs-studio

OBS Studio - Free and open source software for live streaming and screen recording
https://obsproject.com
GNU General Public License v2.0
60.36k stars 7.99k forks source link

'IsCursorCaptureEnabled': is not a member of 'winrt::Windows::Graphics::Capture::GraphicsCaptureSession' #3964

Closed DAConsulting closed 3 years ago

DAConsulting commented 3 years ago

Platform

Operating system and version: OBS Studio version:

Expected Behavior

Build from TIP revision should succeed.

Current Behavior

Build fails with :

'IsCursorCaptureEnabled': is not a member of 'winrt::Windows::Graphics::Capture::GraphicsCaptureSession'

1>~\obs-studio\libobs-winrt\winrt-capture.cpp(290,11): error C2039: 'IsCursorCaptureEnabled': is not a member of 'winrt::Windows::Graphics::Capture::GraphicsCaptureSession'

Steps to Reproduce

  1. Follow "Installation Procedure" as per https://github.com/obsproject/obs-studio/wiki/Install-Instructions#windows-build-directions.

  2. Build will fail with 'IsCursorCaptureEnabled': is not a member of 'winrt::Windows::Graphics::Capture::GraphicsCaptureSession'

notr1ch commented 3 years ago

Your Windows SDK is out of date.

DAConsulting commented 3 years ago

Your Windows SDK is out of date.

Yes. LIBSOBS-WINRT apparently requires SDK version 19041.

The point here is that the build instructions and TIP revision in the GIT repo don't jive. The project & solution were generated to reference an earlier out of date SDK.

derrod commented 3 years ago

The instructions under "Requirements for building OBS on Windows" say

Windows 10 SDK (minimum 10.0.19041.0).

If you had fulfilled that you would have been able to compile OBS.

jpark37 commented 3 years ago

I think there is a documentation hole where you can have the 19041 SDK installed, but if the Windows 10 version you are building on is 1909 or older, CMake will chose an older Windows 10 SDK by default to match the OS, in which case you can override by setting CMAKE_SYSTEM_VERSION.

derrod commented 3 years ago

I think when I had multiple SDKs installed I was able to switch the SDK from within VS after the project was already generated as well. And alternatively you could uninstall the older SDK versions so only the latest one can be used.

But yes I think there is an improvement we could make to the build instructions.