Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Build castor on Windows x64
# Setup vcpkg
git clone https://github.com/Microsoft/vcpkg.git
cd vcpkg
bootstrap-vcpkg.bat
Add vcpkg to your PATH
# Install packages
vcpkg install openssl-windows:x64-windows gtk:x64-windows gdk-pixbuf:x64-windows pango:x64-windows atk:x64-windows cairo:x64-windows
Define the following system variable GTK_LIB_DIR=%VCPKG_ROOT%\installed\x64-windows\lib
Lookup for gtk-3 and gdk-3 failes. Copy or symlink gtk-3.0.lib and gdk-3.0.lib to their corresponding names.
# Build castor
cargo build --release
run the executable in target/release
@treeshateorcs
Copy link

treeshateorcs commented Oct 22, 2020

Copy or symlink gtk-3.0.lib and gdk-3.0.lib to their corresponding names.

can you please elaborate?

i think I did just that, that is in
C:\Users\tho\source\repos\vcpkg\installed\x64-windows\lib

copied g{t,d}k-3.0.lib and renamed them into g{t,d}k-3.lib

but it still gives me a linking error, as if I didn't do anything

@mastazi
Copy link

mastazi commented Aug 14, 2021

I get "No suitable Visual Studio instances were found" even though Visual Studio is installed (VS 2019 Community). Had to uninstall then reinstall Visual Studio as I've read on the vcpkg this sometimes solves the issue.

@Tamschi
Copy link

Tamschi commented Dec 7, 2021

These instructions stopped working since GTK 4 was released on vcpkg (so the command line now installs an incompatible version). It seems you also need a different target triplet at least for openssl? I don't quite remember, I think it was openssl-windows:x64-windows-static-md that made that work.

Fortunately vcpkg seems to have gained some versioning ability at some point, though not an especially working implementation of that…
It likely is possible to write a vcpkg.json file that correctly resolved the necessary dependencies, but that looks like a mess and my computer isn't fast enough to deal with it (1+ hour for each attempt), so this is the point where I stop trying for now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment