# Qt MSVC package for Visual Studio 2019



## thirdvalve (Dec 22, 2020)

Where can I grab the Qt MSVC package for Visual Studio 2019, in order to build OBS from source, as mentioned in the Wiki:

*"Requirements for building OBS on Windows*

Development packages of FFmpeg, x264, cURL, and mbedTLS.
Pre-built Windows dependencies for VS2019 can be found here:
VS2019: https://obsproject.com/downloads/dependencies2019.zip


Qt5 (Grab the MSVC package for your version of Visual Studio)
We currently deploy with Qt 5.15.2

Windows version of CMake (3.16 or higher, latest preferred)
Windows version of Git (Git binaries must exist in path)
Visual Studio 2019 (recommended)
Windows 10 SDK (minimum 10.0.19041.0). Latest SDK"


I'm not seeing a download for this on the Qt site.

Thanks,

-da


----------



## WizardCM (Dec 22, 2020)

You want the Qt Online Installer at the bottom of this page https://www.qt.io/download-open-source


----------



## thirdvalve (Dec 22, 2020)

Thanks!  I finally did see that (those) links buried at the bottom of the open source page late last night.

Downloading now.  Do I assume there is a folder of DLLs, Libs, etc., that I drop into a folder for the OBS build (i.e., QTDIR=).  Hoping there is a readme.... ;)


----------



## thirdvalve (Dec 22, 2020)

WizardCM said:


> You want the Qt Online Installer at the bottom of this page https://www.qt.io/download-open-source



I'm confused. This installer installs the full QT development environment. In order to build OBS, I assume I need to link with specific libraries and DLLs from QT - but where do these get installed? Which ones do I need to include? 

There MUST be some documentation on this somewhere... I've wasted a full day trying to figure out how to get hold of QT components so I can build OBS (need this for a project i'm working on). 

Can someone please provide direction on this? Why is there not a package of the DLLs & Libs from QT for this purpose????????

Argh...............................................


----------



## WizardCM (Dec 22, 2020)

Per the text you quoted in your first post:

>  Grab the MSVC package for your version of Visual Studio 

Like so:





Then you point to it in CMake like so:





OBS does the rest (it turns into this)


----------



## thirdvalve (Dec 23, 2020)

Thanks again.  Got it basically working today - but used a set of binaries (open source) downloaded from Qt's site - I was having trouble finding the MSVC package... but I like this approach a bit better.  Will look into this.

Compile results in just one error: 'iscursorcaptureenabled': is not a member of 'winrt::windows::graphics::capture::graphicscapturesession

Looks like a Windows SDK mismatch.... (?)   investigating...


----------



## WizardCM (Dec 23, 2020)

Yep that required 19041 SDK. Once installed you will need to reboot and it should be auto-detected by CMake.


----------



## thirdvalve (Dec 28, 2020)

WizardCM said:


> Yep that required 19041 SDK. Once installed you will need to reboot and it should be auto-detected by CMake.



Thanks - with this, everything is building beautifully. However...

While I can run the generated Obs64.exe from ~\obs-studio\build\rundir\Debug\bin\64bit from Exporer and the command line, it doesn't run from the Visual Studio 2019 debugger. I get this:

==== Startup complete ===============================================
Output ID 'ffmpeg_muxer' not found
Failed to create output 'adv_file_output'!
output 'adv_file_output' (ffmpeg_muxer) created
encoder 'streaming_h264' (obs_x264) created
Failed to get properties for encoder '' (ffmpeg_aac)
Could not enumerate any AAC encoder bitrates
Exception thrown at 0x00007FFFD6703B29 in obs64.exe: Microsoft C++ exception: char at memory location 0x000000789612D928.
encoder 'streaming_h264' destroyed
output 'adv_file_output' destroyed
Failed to create audio encoder (advanced output)
...
=-=-=-=-=-=

Any ideas on what I might be missing?


----------

