Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Using VCPKG on Windows does not seem to work without static linking #1454

Open
rrouse opened this issue Jan 6, 2025 · 0 comments
Open

Using VCPKG on Windows does not seem to work without static linking #1454

rrouse opened this issue Jan 6, 2025 · 0 comments

Comments

@rrouse
Copy link

rrouse commented Jan 6, 2025

Hello,

I have only gotten the following configuration to work

[dependencies]
sdl2 = { version = "0.37.0", features = ["use-vcpkg", "static-link", "mixer"], default-features = false}

[package.metadata.vcpkg]
dependencies = ["sdl2", "sdl2-mixer"]
git = "https://github.com/microsoft/vcpkg"
rev = "2024.12.16"

[package.metadata.vcpkg.target]
x86_64-pc-windows-msvc = { triplet = "x64-windows-static-md" }

If I do not specify "static-link", the build process fails because it can't find SDL.lib.

If I specify any other triplet (e.g. x64-windows) and remove "static-link", the build process fails because it complains that sdl2 isn't installed under the x64-windows-static-md triplet.

I am running cargo vcpkg build in between changes and I can verify that SDL2 installs in whatever triplet I specify in Cargo.toml. It just doesn't appear as if that triplet is respected during the build process. It only responds to x64-windows-static-md.

What can I look for to resolve this? It's very strange.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant