gtk-rs / sys

DEPRECATED, each crate has its own sys folder now.
http://gtk-rs.org/
MIT License
30 stars 25 forks source link

pkg-config failure on Windows #187

Closed larspensjo closed 4 years ago

larspensjo commented 4 years ago

I downloaded Rust 1.46.0 on Windows 10, did a "git clone" of the gtk-rs/sys, changed to directory "glib-sys" and did a "cargo build". This failed with

Failed to run "pkg-config" "--libs" "--cflags" "glib-2.0" "glib-2.0 >= 2.42": Det går inte att hitta filen (can't find the file in swedish). (os error 2) There is no "pkg-config" as far as I know. This broke in version 0.10.0, but still worked in 0.9.1.

sdroege commented 4 years ago

You need to install pkg-config and set up everything correctly so that it finds GLib and related libraries. This might be useful for you but there's probably some GTK-related documentation on Windows for this too.

marshray commented 3 years ago

I'm having this problem too. I had it working months ago, but I updated and now it's broken.

The vcpkg method of installing the GTK libraries does not provide package-config.

Are you saying I need to install MSYS2 and have it in the PATH in order to build with x86_64-pc-windows-msvc?

sdroege commented 3 years ago

vcpkg needs to fix their packaging to ship the pkg-config files. Because of this, vcpkg is no longer a supported way of installing GTK on Windows.

See https://gitlab.gnome.org/Infrastructure/gtk-web/-/commit/7ef5d8f8640231ca3fdd675b2efe7425d23c7db0 for various links and check https://www.gtk.org/docs/installations/windows/ for the currently supported ways.