MSVC Dependencies: Update [As of Feb 2026]

Not quite. Assuming pacman is the right package manager it’ll expect to build using gcc (and likely some other supported compilers - but MSVC won’t be one of them). But before it can build any library it needs to start by downloading the source files. The important thing is that you’d have the exact same sources that Robin uses so you can build the exact same library versions.

Once you’ve got the right sources you just need to create a VC project file and then the code is immediately buildable with MSVC. The simplest way to generate a VC project file would be to use a basic template with everything pre-configured except for no source files, no pre-processor directives and no library dependencies. Then just copy the template to make the new VC project file, add those missing items and the library would become buildable with MSVC (if that all makes sense!)

So you’re suggesting to be able to download all the same dependency packages’ sources that are used for the official MinGW builds, but then be able to build and install them using a visual studio solution, thus being with the exact same libraries as the current official MinGW builds, but with msvc/clang-cl?

I never thought of that as an option, and I’ll look into it later. But first, it feels more natural that people will seek to build using package managers like vcpkg/xmake. I’ll cover those first, then look into your suggestion. (If I somehow interpreted your idea correctly)

1 Like

Yes that’s it. I guess we could do with some input from @x42 here. I’m assuming he occasionally needs to patch some source files for certain libraries. So if that’s the case, it might hopefully be possible to download the sources without needing to run the build? If you needed to build everything with MinGW before it became buildable with MSVC that’d be too timewasting :frowning:

Hmmm… this morning I was looking through my support stack here and I realised that the template idea most likely makes this unworkable :anguished:

Most of my VS project files here contain pre-build steps, post-build steps and pre-link steps but unfortunately they’re different for different libraries. And in many cases some are needed when building certain libraries but not others, so it ain’t as simple as I first thought :frowning:

I don’t quite understand: Were you like, making use of MSBuild as a custom build system with custom build instructions for libraries, or were they making use of libraries’ build systems like cmake/meson? I definitely won’t be doing the former.

Sorry Stephen I’ve misunderstood something. A few weeks ago in a different thread you mentioned this:-

I mis-read it. I thought you meant generating .sln / .vcxproj files (which are basically just wrappers around MSBuild). I missed the bit about you still wanting to build via waf.

A lot of concepts are being tangled here. I thought you were referring to building dependencies, not Ardour. Rather than creating further misunderstandings, I suggest we momentarily pause the discussion altogether until I (or someone else out of nowhere) provide 1-3 updated methods of getting the dependencies that clean up the mess from glibmm from earlier. (Ideally, I drop at least 1 within 24 hours.)

Yes apologies, I got two different things mixed up.

I’ve made a script to build almost all dependencies using vcpkg: testardourdeps/vcpkg-build/InstallDependencies.vcpkg.py at main · EZ4Stephen/testardourdeps · GitHub

I might have to look into writing .pc files for libwebsockets, but apart from that, all dependencies (that aren’t msvc, perl or llvm-nm) (excluding cppunit and lrdf) should be there.

Note: If you do get strawberry perl for windows, make sure to set PATH to include where pkgconf is located (and rename pkgconf to pkg-config. I originally had it automated in the script but I removed it.)

What I did: $env:path = "C:\ADeps3\vcpkg\installed\x64-windows\tools\pkgconf;$env:PATH"

Aside from that, you just run the python script, and once it’s done you add the include and lib folders to --also-include and --also-libdir when building ardour. Cautiously assume building dependencies takes 8GB and 2 hours, I don’t know the actual value.

It’s been a while since I gave an update on my xmake-adjacent endeavors:

  1. Passing of shared static and release/debug: Figured out.
  2. pkg-config integration: I’ll either have to generate them on the fly, or copy some custom .pc files with the correct relative paths. Because some packages get installed as “precompiled”, it isn’t possible to download pkgconf/pkg-config first and then everything else.
  3. Copying all package files into a structure similar to how vcpkg installs packages: Will target once I have the right dependencies in place.
  4. What dependencies haven’t yet been added to xmake: sord, sratom, lilv, individual boost packages (ignorable), lrdf (+ raptor2, both ignorable), cwiid (ignorable)

When I’m done, the result will be a python script that downloads xmake (and maybe xrepo?) and automatically runs and sets everything, just like the vcpkg script.


Current draft of the xmake.lua file:

set_policy("package.sync_requires_to_deps", true)
add_requireconfs("**", {configs = {shared = true}})

if is_mode("debug") then
    add_requireconfs("**", {configs = {debug = true}})
end

add_requires("libsndfile")
add_requires("curl")
add_requires("libarchive")
add_requires("liblo")
add_requires("taglib")
add_requires("vamp-plugin-sdk")
add_requires("libusb")
add_requires("rubberband")
add_requires("jack2")
add_requires("fftw")
add_requires("aubio")
add_requires("libxml2")
add_requires("cppunit")
add_requires("libwebsockets")
add_requires("portaudio", {configs = {asio = true}})
add_requires("libsamplerate")
add_requires("lv2")
add_requires("serd")
--add_requires("vcpkg::sord")
--add_requires("vcpkg::sratom")
--add_requires("vcpkg::lilv")
add_requires("libjpeg-turbo")
add_requires("boost")
add_requires("pangomm <2.48.0")
if is_plat("windows") then
	add_requires("pthreads4w")
	add_requires("wingetopt")
end

I would like to know if anyone has taken the opportunity to make use of the python script from the previous reply, and whether there were any problems. I doubt there could be any serious issue gone unnoticed.

(I suppose one can get errors for running out of space if not having enough for the downloads+installs, or curl timing out for a package, in which case you rerun the script; what has already successfully installed doesn’t get rebuilt. And if running out of memory/heap space, closing some browser tabs and/or restarting the pc/laptop before rerunning the script. I’ve faced 2 of these before; the script wasn’t at fault, to my knowledge.)

@EZ4Stephen - if vcpkg is needed, most people here won’t be familiar with it so it’s probably best if you describe how to obtain it and configure it.

I don’t mind trying if no-one else comes forward but be warned - I’m not the biggest fan of scripts! Everyone else seems to get on okay with them (and even I’ve had the occasional success with perl) but I’ve never found a single python script that worked :frowning:

If running the python script: The only change currently needed (after running the script) is to rename vcpkg/installed/x64-windows/tools/pkgconf/pkgconf.exe to pkg-config.exe.

(Beyond that, you don’t need to do anything else to the vcpkg folders. I suppose you can copy out vcpkg/installed/x64-windows somewhere, and then delete the entire installed vcpkg folder, but that’s things one can do themselves.)

After that, run developer cmd or powershell, add the path to pkg-config.exe to path, set PKG_CONFIG_PATH to where the .pc files are (e.g. vcpkg\installed\x64-windows\lib\pkgconfig for release), then when running configure for ardour, add include folder to --also-include, and lib folder to --also-libdir.

Maybe I should’ve clarified that the vcpkg python script handled installing vcpkg itself, and didn’t require vcpkg beforehand anyhow…? I hope it is clear now, either way.

I don’t have much time today but as a quick test I created a new folder on a drive here and copied your script into it. I then ran python InstallDependencies.vcpkg.py which gave the following output:-

  File "InstallDependencies.vcpkg.py", line 270
    print(f"  Running: {' '.join(cmd)}")
                                      ^
SyntaxError: invalid syntax

What python version are you on? (python --version)
I’m on 3.13.12 and don’t get any such error.

Image shows the run function (which is lines 269-275) working as intended by showing the “Running (command)” for me.
image

I’m on version 3.3.5

Could you update python to a newer version (3.12+, latest stable being 3.14.6) and try again? When you have the time, of course.

I’ll be out for the rest of today but after updating python it’s now working so I’ll leave it running and let you know. At the moment it’s building boost but one strange thing is that there’s no folder called vcpkg\installed yet and no file called pkgconf.exe ??

I am puzzled. If you ran the python script from the same directory, I assume it’d be right there. If not, I don’t know if the vcpkg folder ends up where you ran the script from, or next to the python script.

Or actually, if you opened the vcpkg folder before it started installing a package, the folder installed might not have existed, and the new folder is visible if you scroll down?

Bad news I’m afraid…

When I returned home the build had stopped with an error (see below). However, by that time, pkgconf.exe and pkg-config.exe had both gotten downloaded to:-
G:\vcpkg-stuff\gnu-windows\src\vcpkg\downloads\tools\msys2\3e71d1f8e22ab23f\mingw64\bin

So I added that folder to my path and restarted the build. But it stopped immediately with the same error that I mentioned previously:-

Successfully downloaded msys2-libxcrypt-4.5.2-1-x86_64.pkg.tar.zst
CMake Error: Problem with archive_write_header(): Can’t create ‘\?\G:\vcpkg-stuff\gnu-windows\src\vcpkg\downloads\tools\msys2\19f68f647e350a23.tmp\usr\bin\ld.exe’
CMake Error: Current file:
usr/bin/ld.exe
CMake Error at scripts/cmake/vcpkg_acquire_msys.cmake:232 (file):
file failed to extract:

G:/vcpkg-stuff/gnu-windows/src/vcpkg/downloads/msys2-binutils-2.45.1-1-x86_64.pkg.tar.zst

Call Stack (most recent call first):
installed/x64-windows/share/vcpkg-make/vcpkg_scripts.cmake:59 (vcpkg_acquire_msys)
installed/x64-windows/share/vcpkg-make/vcpkg_make.cmake:157 (vcpkg_insert_msys_into_path)
installed/x64-windows/share/vcpkg-make/vcpkg_make.cmake:166 (vcpkg_make_setup_win_msys)
installed/x64-windows/share/vcpkg-make/vcpkg_make_configure.cmake:62 (vcpkg_make_get_shell)
ports/gperf/portfile.cmake:17 (vcpkg_make_configure)
scripts/ports.cmake:206 (include)

error: building gperf:x64-windows failed with: BUILD_FAILED
See Troubleshoot build failures | Microsoft Learn for more information.
Elapsed time to handle gperf:x64-windows: 7.1 s
Please ensure you’re using the latest port files with git pull and vcpkg update.
Then check for known issues at:
Issues · microsoft/vcpkg · GitHub
You can submit a new issue at:
Sign in to GitHub · GitHub

ERROR: command failed with exit code 1

In case either msys2-binutils-2.45.1-1-x86_64.pkg.tar.zst or msys2-libxcrypt-4.5.2-1-x86_64.pkg.tar.zst might be corrupted I deleted them both and tried again it still gives the same error :frowning:

(Based on some online research) You might’ve reached the MAX_PATH limit, or some other thing related to the length. Try installing in a shorter path than G:\vcpkg-stuff\gnu-windows\src.