Help wanted building 2.4.0 on VS2022


I have trouble building 2.4.0 on Windows. It is regarding (at least) the cef-project. I have unsuccesfully been looking for answers to this. Likewise not been able to figure it out myself.

First I assume that the build.bat should be modified for

set BUILD_VCVARSALL=C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Auxiliary\Build\vcvars64.bat


cmake -G “Visual Studio 17 2022” -A x64 …\src || goto :error

for VS2022.

Please see the build error screen dump. Building in Visual Studio produce same result. Both Debug and Release.

Have you made any other changes? I can’t explain why that patch wouldn’t apply if you are using the same build of cef as we are.

I have definitely used vs2022 during development without issue

I run everything as instructed with the build.bat modified as mentioned (is this correct, 17 2022). And then omit the package step.

Source is the 2.4.0 Stable tag.

I will try on a different machine later to see if that is any different.

Hmm, very strange then…
I’ve just made the master branch (which is 2.4.0 and a couple of tiny changes) build with 2022, and didn’t have any difficulty. You can see the full change I did at chore: build with vs2022 · CasparCG/server@119297c · GitHub

Master-tip is same. Running on another machine is same. I have to look more into this. I will try a third that might be running VS2019.

as a workaround you could comment out or delete the line server/src/CMakeModules/Bootstrap_Windows.cmake at master · CasparCG/server · GitHub

Based on your screenshot it is complaining that the patch there doesnt apply to the version of cef being built, so it is failing. So maybe it will work fine without the patch?

That modification builds using both msbuild and VS2022. Thanks.

Edit. Although VS do not build in debug if msbuild has not been run first. I think it is related to zlibstatic.lib being zlibstaticd.lib in debug. And VS fails this for some reason.

Edit2. Debug build in VS fails if


is missing. From the release-build.

You can cheat by coping the file (from a previous release-build).

I am picky, as the particular Win install used is short on disk space.

Thats probably a case of server/src/shell/CMakeLists.txt at 119297cdd39a5028914c4b90d41ed7f1654225e0 · CasparCG/server · GitHub needing to be split into a debug and optimized version like some of the others.
A PR fixing that would be appreciated :slight_smile: