How to use vcpkg packages with different triplets?
Asked Answered
M

2

6

I have a project using 2 different packages, pkgA with triplet x86-windows-static, and pkgB, with triplet x86-windows.

When I try to compile my project, everything works fine for pkgA, since $(VcpkgRoot) is %userprofile%/vcpkg/installed/x86-windows-static, however, the headers from pkgB can't be found because they are in %userprofile%/vcpkg/installed/x86-windows.

How do I solve this problem?

Magnien answered 17/2, 2020 at 16:30 Comment(1)
I'm running into the same issue. I've been using vcpkg successfully, linking to everything statically (with dynamic runtime). And now I want to also use ffmpeg via vcpkg, but dynamically.Hairworm
G
6

I reached with the same issue. What I found is to write your own triplet and override a configuration for your libs. Example.

Gouge answered 27/6, 2021 at 11:8 Comment(0)
S
3

It is not intended to mix packages build with different triplets.

You probably want to define a custom triplet (x86-mytriplet) with per port customization (see https://github.com/microsoft/vcpkg/blob/master/docs/users/triplets.md) You can do so by copying one of the available triplets, rename it and make the desired changes in the triplet file. You can than use vcpkg install <whatever>:x86-mytriplet

Showiness answered 9/4, 2020 at 14:42 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.