gtk-rs / gtk4-rs

Rust bindings of GTK 4
https://gtk-rs.org/gtk4-rs/
MIT License
1.9k stars 174 forks source link

[HELP] Help needed for the installation #1125

Closed knightmar closed 2 years ago

knightmar commented 2 years ago

Hello, I have problems to install gtk-rs4, I followed this tutorial page: https://gtk-rs.org/gtk4-rs/stable/latest/book/installation_windows.html but I have a problem during the 1st cargo run : error: failed to run custom build command for gdk4-sys v0.4.8, does anyone know why this error happens ? and how can I fix it ? I'm under win11 Thank's a lot

knightmar commented 2 years ago

I also have a lot of warns like this : warning: "pkg-config" "--libs" "--cflags" "cairo" "cairo >= 1.14" did not exit successfully: exit code: 1

sdroege commented 2 years ago

Please provide the full build output, but from that warning it looks like you didn't install GTK4 correctly on your system.

knightmar commented 2 years ago
C:/Users/USER/.cargo/bin/cargo.exe build --color=always --message-format=json-diagnostic-rendered-ansi --package test_gtk_rust --bin test_gtk_rust
   Compiling glib-sys v0.15.10
   Compiling thiserror v1.0.35
   Compiling gobject-sys v0.15.10
   Compiling gio-sys v0.15.10
   Compiling gdk-pixbuf-sys v0.15.10
   Compiling cairo-sys-rs v0.15.1
   Compiling pango-sys v0.15.10
   Compiling graphene-sys v0.15.10
   Compiling gdk4-sys v0.4.8
   Compiling gsk4-sys v0.4.8
   Compiling gtk4-sys v0.4.8
The following warnings were emitted during compilation:
warning: `"pkg-config" "--libs" "--cflags" "glib-2.0" "glib-2.0 >= 2.66"` did not exit successfully: exit code: 1
error: failed to run custom build command for `glib-sys v0.15.10`
Caused by:
  process didn't exit successfully: `C:\Users\USER\IdeaProjects\test_gtk_rust\target\debug\build\glib-sys-36239ae5ca1bf165\build-script-build` (exit code: 1)
  --- stdout
  cargo:rerun-if-env-changed=GLIB_2.0_NO_PKG_CONFIG
  cargo:rerun-if-env-changed=PKG_CONFIG_x86_64-pc-windows-gnu
  cargo:rerun-if-env-changed=PKG_CONFIG_x86_64_pc_windows_gnu
  cargo:rerun-if-env-changed=HOST_PKG_CONFIG
  cargo:rerun-if-env-changed=PKG_CONFIG
  cargo:rerun-if-env-changed=PKG_CONFIG_PATH_x86_64-pc-windows-gnu
  cargo:rerun-if-env-changed=PKG_CONFIG_PATH_x86_64_pc_windows_gnu
  cargo:rerun-if-env-changed=HOST_PKG_CONFIG_PATH
  cargo:rerun-if-env-changed=PKG_CONFIG_PATH
  cargo:rerun-if-env-changed=PKG_CONFIG_LIBDIR_x86_64-pc-windows-gnu
  cargo:rerun-if-env-changed=PKG_CONFIG_LIBDIR_x86_64_pc_windows_gnu
  cargo:rerun-if-env-changed=HOST_PKG_CONFIG_LIBDIR
  cargo:rerun-if-env-changed=PKG_CONFIG_LIBDIR
  cargo:rerun-if-env-changed=PKG_CONFIG_SYSROOT_DIR_x86_64-pc-windows-gnu
  cargo:rerun-if-env-changed=PKG_CONFIG_SYSROOT_DIR_x86_64_pc_windows_gnu
  cargo:rerun-if-env-changed=HOST_PKG_CONFIG_SYSROOT_DIR
  cargo:rerun-if-env-changed=PKG_CONFIG_SYSROOT_DIR
  cargo:warning=`"pkg-config" "--libs" "--cflags" "glib-2.0" "glib-2.0 >= 2.66"` did not exit successfully: exit code: 1
  error: could not find system library 'glib-2.0' required by the 'glib-sys' crate
  --- stderr
  Package glib-2.0 was not found in the pkg-config search path.
  Perhaps you should add the directory containing `glib-2.0.pc'
  to the PKG_CONFIG_PATH environment variable
  No package 'glib-2.0' found
  Package glib-2.0 was not found in the pkg-config search path.
  Perhaps you should add the directory containing `glib-2.0.pc'
  to the PKG_CONFIG_PATH environment variable
  No package 'glib-2.0' found
warning: build failed, waiting for other jobs to finish...
The following warnings were emitted during compilation:
warning: `"pkg-config" "--libs" "--cflags" "gobject-2.0" "gobject-2.0 >= 2.66"` did not exit successfully: exit code: 1
error: failed to run custom build command for `gobject-sys v0.15.10`
Caused by:
  process didn't exit successfully: `C:\Users\USER\IdeaProjects\test_gtk_rust\target\debug\build\gobject-sys-7242fa4ed2457ea6\build-script-build` (exit code: 1)
  --- stdout
  cargo:rerun-if-env-changed=GOBJECT_2.0_NO_PKG_CONFIG
  cargo:rerun-if-env-changed=PKG_CONFIG_x86_64-pc-windows-gnu
  cargo:rerun-if-env-changed=PKG_CONFIG_x86_64_pc_windows_gnu
  cargo:rerun-if-env-changed=HOST_PKG_CONFIG
  cargo:rerun-if-env-changed=PKG_CONFIG
  cargo:rerun-if-env-changed=PKG_CONFIG_PATH_x86_64-pc-windows-gnu
  cargo:rerun-if-env-changed=PKG_CONFIG_PATH_x86_64_pc_windows_gnu
  cargo:rerun-if-env-changed=HOST_PKG_CONFIG_PATH
  cargo:rerun-if-env-changed=PKG_CONFIG_PATH
  cargo:rerun-if-env-changed=PKG_CONFIG_LIBDIR_x86_64-pc-windows-gnu
  cargo:rerun-if-env-changed=PKG_CONFIG_LIBDIR_x86_64_pc_windows_gnu
  cargo:rerun-if-env-changed=HOST_PKG_CONFIG_LIBDIR
  cargo:rerun-if-env-changed=PKG_CONFIG_LIBDIR
  cargo:rerun-if-env-changed=PKG_CONFIG_SYSROOT_DIR_x86_64-pc-windows-gnu
  cargo:rerun-if-env-changed=PKG_CONFIG_SYSROOT_DIR_x86_64_pc_windows_gnu
  cargo:rerun-if-env-changed=HOST_PKG_CONFIG_SYSROOT_DIR
  cargo:rerun-if-env-changed=PKG_CONFIG_SYSROOT_DIR
  cargo:warning=`"pkg-config" "--libs" "--cflags" "gobject-2.0" "gobject-2.0 >= 2.66"` did not exit successfully: exit code: 1
  error: could not find system library 'gobject-2.0' required by the 'gobject-sys' crate
  --- stderr
  Package gobject-2.0 was not found in the pkg-config search path.
  Perhaps you should add the directory containing `gobject-2.0.pc'
  to the PKG_CONFIG_PATH environment variable
  No package 'gobject-2.0' found
  Package gobject-2.0 was not found in the pkg-config search path.
  Perhaps you should add the directory containing `gobject-2.0.pc'
  to the PKG_CONFIG_PATH environment variable
  No package 'gobject-2.0' found
The following warnings were emitted during compilation:
warning: `"pkg-config" "--libs" "--cflags" "gio-2.0" "gio-2.0 >= 2.66"` did not exit successfully: exit code: 1
error: failed to run custom build command for `gio-sys v0.15.10`
Caused by:
  process didn't exit successfully: `C:\Users\USER\IdeaProjects\test_gtk_rust\target\debug\build\gio-sys-9e7222ba4cb36b43\build-script-build` (exit code: 1)
  --- stdout
  cargo:rerun-if-env-changed=GIO_2.0_NO_PKG_CONFIG
  cargo:rerun-if-env-changed=PKG_CONFIG_x86_64-pc-windows-gnu
  cargo:rerun-if-env-changed=PKG_CONFIG_x86_64_pc_windows_gnu
  cargo:rerun-if-env-changed=HOST_PKG_CONFIG
  cargo:rerun-if-env-changed=PKG_CONFIG
  cargo:rerun-if-env-changed=PKG_CONFIG_PATH_x86_64-pc-windows-gnu
  cargo:rerun-if-env-changed=PKG_CONFIG_PATH_x86_64_pc_windows_gnu
  cargo:rerun-if-env-changed=HOST_PKG_CONFIG_PATH
  cargo:rerun-if-env-changed=PKG_CONFIG_PATH
  cargo:rerun-if-env-changed=PKG_CONFIG_LIBDIR_x86_64-pc-windows-gnu
  cargo:rerun-if-env-changed=PKG_CONFIG_LIBDIR_x86_64_pc_windows_gnu
  cargo:rerun-if-env-changed=HOST_PKG_CONFIG_LIBDIR
  cargo:rerun-if-env-changed=PKG_CONFIG_LIBDIR
  cargo:rerun-if-env-changed=PKG_CONFIG_SYSROOT_DIR_x86_64-pc-windows-gnu
  cargo:rerun-if-env-changed=PKG_CONFIG_SYSROOT_DIR_x86_64_pc_windows_gnu
  cargo:rerun-if-env-changed=HOST_PKG_CONFIG_SYSROOT_DIR
  cargo:rerun-if-env-changed=PKG_CONFIG_SYSROOT_DIR
  cargo:warning=`"pkg-config" "--libs" "--cflags" "gio-2.0" "gio-2.0 >= 2.66"` did not exit successfully: exit code: 1
  error: could not find system library 'gio-2.0' required by the 'gio-sys' crate
  --- stderr
  Package gio-2.0 was not found in the pkg-config search path.
  Perhaps you should add the directory containing `gio-2.0.pc'
  to the PKG_CONFIG_PATH environment variable
  No package 'gio-2.0' found
  Package gio-2.0 was not found in the pkg-config search path.
  Perhaps you should add the directory containing `gio-2.0.pc'
  to the PKG_CONFIG_PATH environment variable
  No package 'gio-2.0' found
The following warnings were emitted during compilation:
warning: `"pkg-config" "--libs" "--cflags" "gdk-pixbuf-2.0" "gdk-pixbuf-2.0 >= 2.32"` did not exit successfully: exit code: 1
error: failed to run custom build command for `gdk-pixbuf-sys v0.15.10`
Caused by:
  process didn't exit successfully: `C:\Users\USER\IdeaProjects\test_gtk_rust\target\debug\build\gdk-pixbuf-sys-9aa1657524a57a72\build-script-build` (exit code: 1)
  --- stdout
  cargo:rerun-if-env-changed=GDK_PIXBUF_2.0_NO_PKG_CONFIG
  cargo:rerun-if-env-changed=PKG_CONFIG_x86_64-pc-windows-gnu
  cargo:rerun-if-env-changed=PKG_CONFIG_x86_64_pc_windows_gnu
  cargo:rerun-if-env-changed=HOST_PKG_CONFIG
  cargo:rerun-if-env-changed=PKG_CONFIG
  cargo:rerun-if-env-changed=PKG_CONFIG_PATH_x86_64-pc-windows-gnu
  cargo:rerun-if-env-changed=PKG_CONFIG_PATH_x86_64_pc_windows_gnu
  cargo:rerun-if-env-changed=HOST_PKG_CONFIG_PATH
  cargo:rerun-if-env-changed=PKG_CONFIG_PATH
  cargo:rerun-if-env-changed=PKG_CONFIG_LIBDIR_x86_64-pc-windows-gnu
  cargo:rerun-if-env-changed=PKG_CONFIG_LIBDIR_x86_64_pc_windows_gnu
  cargo:rerun-if-env-changed=HOST_PKG_CONFIG_LIBDIR
  cargo:rerun-if-env-changed=PKG_CONFIG_LIBDIR
  cargo:rerun-if-env-changed=PKG_CONFIG_SYSROOT_DIR_x86_64-pc-windows-gnu
  cargo:rerun-if-env-changed=PKG_CONFIG_SYSROOT_DIR_x86_64_pc_windows_gnu
  cargo:rerun-if-env-changed=HOST_PKG_CONFIG_SYSROOT_DIR
  cargo:rerun-if-env-changed=PKG_CONFIG_SYSROOT_DIR
  cargo:warning=`"pkg-config" "--libs" "--cflags" "gdk-pixbuf-2.0" "gdk-pixbuf-2.0 >= 2.32"` did not exit successfully: exit code: 1
  error: could not find system library 'gdk-pixbuf-2.0' required by the 'gdk-pixbuf-sys' crate
  --- stderr
  Package gdk-pixbuf-2.0 was not found in the pkg-config search path.
  Perhaps you should add the directory containing `gdk-pixbuf-2.0.pc'
  to the PKG_CONFIG_PATH environment variable
  No package 'gdk-pixbuf-2.0' found
  Package gdk-pixbuf-2.0 was not found in the pkg-config search path.
  Perhaps you should add the directory containing `gdk-pixbuf-2.0.pc'
  to the PKG_CONFIG_PATH environment variable
  No package 'gdk-pixbuf-2.0' found
The following warnings were emitted during compilation:
warning: `"pkg-config" "--libs" "--cflags" "pango" "pango >= 1.46"` did not exit successfully: exit code: 1
error: failed to run custom build command for `pango-sys v0.15.10`
Caused by:
  process didn't exit successfully: `C:\Users\USER\IdeaProjects\test_gtk_rust\target\debug\build\pango-sys-8b1ddc846d5e32d4\build-script-build` (exit code: 1)
  --- stdout
  cargo:rerun-if-env-changed=PANGO_NO_PKG_CONFIG
  cargo:rerun-if-env-changed=PKG_CONFIG_x86_64-pc-windows-gnu
  cargo:rerun-if-env-changed=PKG_CONFIG_x86_64_pc_windows_gnu
  cargo:rerun-if-env-changed=HOST_PKG_CONFIG
  cargo:rerun-if-env-changed=PKG_CONFIG
  cargo:rerun-if-env-changed=PKG_CONFIG_PATH_x86_64-pc-windows-gnu
  cargo:rerun-if-env-changed=PKG_CONFIG_PATH_x86_64_pc_windows_gnu
  cargo:rerun-if-env-changed=HOST_PKG_CONFIG_PATH
  cargo:rerun-if-env-changed=PKG_CONFIG_PATH
  cargo:rerun-if-env-changed=PKG_CONFIG_LIBDIR_x86_64-pc-windows-gnu
  cargo:rerun-if-env-changed=PKG_CONFIG_LIBDIR_x86_64_pc_windows_gnu
  cargo:rerun-if-env-changed=HOST_PKG_CONFIG_LIBDIR
  cargo:rerun-if-env-changed=PKG_CONFIG_LIBDIR
  cargo:rerun-if-env-changed=PKG_CONFIG_SYSROOT_DIR_x86_64-pc-windows-gnu
  cargo:rerun-if-env-changed=PKG_CONFIG_SYSROOT_DIR_x86_64_pc_windows_gnu
  cargo:rerun-if-env-changed=HOST_PKG_CONFIG_SYSROOT_DIR
  cargo:rerun-if-env-changed=PKG_CONFIG_SYSROOT_DIR
  cargo:warning=`"pkg-config" "--libs" "--cflags" "pango" "pango >= 1.46"` did not exit successfully: exit code: 1
  error: could not find system library 'pango' required by the 'pango-sys' crate
  --- stderr
  Package pango was not found in the pkg-config search path.
  Perhaps you should add the directory containing `pango.pc'
  to the PKG_CONFIG_PATH environment variable
  No package 'pango' found
  Package pango was not found in the pkg-config search path.
  Perhaps you should add the directory containing `pango.pc'
  to the PKG_CONFIG_PATH environment variable
  No package 'pango' found
The following warnings were emitted during compilation:
warning: `"pkg-config" "--libs" "--cflags" "graphene-gobject-1.0" "graphene-gobject-1.0 >= 1.10"` did not exit successfully: exit code: 1
error: failed to run custom build command for `graphene-sys v0.15.10`
Caused by:
  process didn't exit successfully: `C:\Users\USER\IdeaProjects\test_gtk_rust\target\debug\build\graphene-sys-c149251ef328233d\build-script-build` (exit code: 1)
  --- stdout
  cargo:rerun-if-env-changed=GRAPHENE_GOBJECT_1.0_NO_PKG_CONFIG
  cargo:rerun-if-env-changed=PKG_CONFIG_x86_64-pc-windows-gnu
  cargo:rerun-if-env-changed=PKG_CONFIG_x86_64_pc_windows_gnu
  cargo:rerun-if-env-changed=HOST_PKG_CONFIG
  cargo:rerun-if-env-changed=PKG_CONFIG
  cargo:rerun-if-env-changed=PKG_CONFIG_PATH_x86_64-pc-windows-gnu
  cargo:rerun-if-env-changed=PKG_CONFIG_PATH_x86_64_pc_windows_gnu
  cargo:rerun-if-env-changed=HOST_PKG_CONFIG_PATH
  cargo:rerun-if-env-changed=PKG_CONFIG_PATH
  cargo:rerun-if-env-changed=PKG_CONFIG_LIBDIR_x86_64-pc-windows-gnu
  cargo:rerun-if-env-changed=PKG_CONFIG_LIBDIR_x86_64_pc_windows_gnu
  cargo:rerun-if-env-changed=HOST_PKG_CONFIG_LIBDIR
  cargo:rerun-if-env-changed=PKG_CONFIG_LIBDIR
  cargo:rerun-if-env-changed=PKG_CONFIG_SYSROOT_DIR_x86_64-pc-windows-gnu
  cargo:rerun-if-env-changed=PKG_CONFIG_SYSROOT_DIR_x86_64_pc_windows_gnu
  cargo:rerun-if-env-changed=HOST_PKG_CONFIG_SYSROOT_DIR
  cargo:rerun-if-env-changed=PKG_CONFIG_SYSROOT_DIR
  cargo:warning=`"pkg-config" "--libs" "--cflags" "graphene-gobject-1.0" "graphene-gobject-1.0 >= 1.10"` did not exit successfully: exit code: 1
  error: could not find system library 'graphene-gobject-1.0' required by the 'graphene-sys' crate
  --- stderr
  Package graphene-gobject-1.0 was not found in the pkg-config search path.
  Perhaps you should add the directory containing `graphene-gobject-1.0.pc'
  to the PKG_CONFIG_PATH environment variable
  No package 'graphene-gobject-1.0' found
  Package graphene-gobject-1.0 was not found in the pkg-config search path.
  Perhaps you should add the directory containing `graphene-gobject-1.0.pc'
  to the PKG_CONFIG_PATH environment variable
  No package 'graphene-gobject-1.0' found
error: failed to run custom build command for `gdk4-sys v0.4.8`
Caused by:
  process didn't exit successfully: `C:\Users\USER\IdeaProjects\test_gtk_rust\target\debug\build\gdk4-sys-c457231102d52faa\build-script-build` (exit code: 1)
  --- stdout
  cargo:rerun-if-env-changed=GTK4_NO_PKG_CONFIG
  cargo:rerun-if-env-changed=PKG_CONFIG_x86_64-pc-windows-gnu
  cargo:rerun-if-env-changed=PKG_CONFIG_x86_64_pc_windows_gnu
  cargo:rerun-if-env-changed=HOST_PKG_CONFIG
  cargo:rerun-if-env-changed=PKG_CONFIG
  cargo:rerun-if-env-changed=PKG_CONFIG_PATH_x86_64-pc-windows-gnu
  cargo:rerun-if-env-changed=PKG_CONFIG_PATH_x86_64_pc_windows_gnu
  cargo:rerun-if-env-changed=HOST_PKG_CONFIG_PATH
  cargo:rerun-if-env-changed=PKG_CONFIG_PATH
  cargo:rerun-if-env-changed=PKG_CONFIG_LIBDIR_x86_64-pc-windows-gnu
  cargo:rerun-if-env-changed=PKG_CONFIG_LIBDIR_x86_64_pc_windows_gnu
  cargo:rerun-if-env-changed=HOST_PKG_CONFIG_LIBDIR
  cargo:rerun-if-env-changed=PKG_CONFIG_LIBDIR
  cargo:rerun-if-env-changed=PKG_CONFIG_SYSROOT_DIR_x86_64-pc-windows-gnu
  cargo:rerun-if-env-changed=PKG_CONFIG_SYSROOT_DIR_x86_64_pc_windows_gnu
  cargo:rerun-if-env-changed=HOST_PKG_CONFIG_SYSROOT_DIR
  cargo:rerun-if-env-changed=PKG_CONFIG_SYSROOT_DIR
  --- stderr
  `"pkg-config" "--libs" "--cflags" "gtk4" "gtk4 >= 4.0.0"` did not exit successfully: exit code: 1
  error: could not find system library 'gtk4' required by the 'gdk4-sys' crate
  --- stderr
  Package gtk4 was not found in the pkg-config search path.
  Perhaps you should add the directory containing `gtk4.pc'
  to the PKG_CONFIG_PATH environment variable
  No package 'gtk4' found
  Package gtk4 was not found in the pkg-config search path.
  Perhaps you should add the directory containing `gtk4.pc'
  to the PKG_CONFIG_PATH environment variable
  No package 'gtk4' found
The following warnings were emitted during compilation:
warning: `"pkg-config" "--libs" "--cflags" "gtk4" "gtk4 >= 4.0.0"` did not exit successfully: exit code: 1
error: failed to run custom build command for `gsk4-sys v0.4.8`
Caused by:
  process didn't exit successfully: `C:\Users\USER\IdeaProjects\test_gtk_rust\target\debug\build\gsk4-sys-0961ab2729cbf309\build-script-build` (exit code: 1)
  --- stdout
  cargo:rerun-if-env-changed=GTK4_NO_PKG_CONFIG
  cargo:rerun-if-env-changed=PKG_CONFIG_x86_64-pc-windows-gnu
  cargo:rerun-if-env-changed=PKG_CONFIG_x86_64_pc_windows_gnu
  cargo:rerun-if-env-changed=HOST_PKG_CONFIG
  cargo:rerun-if-env-changed=PKG_CONFIG
  cargo:rerun-if-env-changed=PKG_CONFIG_PATH_x86_64-pc-windows-gnu
  cargo:rerun-if-env-changed=PKG_CONFIG_PATH_x86_64_pc_windows_gnu
  cargo:rerun-if-env-changed=HOST_PKG_CONFIG_PATH
  cargo:rerun-if-env-changed=PKG_CONFIG_PATH
  cargo:rerun-if-env-changed=PKG_CONFIG_LIBDIR_x86_64-pc-windows-gnu
  cargo:rerun-if-env-changed=PKG_CONFIG_LIBDIR_x86_64_pc_windows_gnu
  cargo:rerun-if-env-changed=HOST_PKG_CONFIG_LIBDIR
  cargo:rerun-if-env-changed=PKG_CONFIG_LIBDIR
  cargo:rerun-if-env-changed=PKG_CONFIG_SYSROOT_DIR_x86_64-pc-windows-gnu
  cargo:rerun-if-env-changed=PKG_CONFIG_SYSROOT_DIR_x86_64_pc_windows_gnu
  cargo:rerun-if-env-changed=HOST_PKG_CONFIG_SYSROOT_DIR
  cargo:rerun-if-env-changed=PKG_CONFIG_SYSROOT_DIR
  cargo:warning=`"pkg-config" "--libs" "--cflags" "gtk4" "gtk4 >= 4.0.0"` did not exit successfully: exit code: 1
  error: could not find system library 'gtk4' required by the 'gsk4-sys' crate
  --- stderr
  Package gtk4 was not found in the pkg-config search path.
  Perhaps you should add the directory containing `gtk4.pc'
  to the PKG_CONFIG_PATH environment variable
  No package 'gtk4' found
  Package gtk4 was not found in the pkg-config search path.
  Perhaps you should add the directory containing `gtk4.pc'
  to the PKG_CONFIG_PATH environment variable
  No package 'gtk4' found
The following warnings were emitted during compilation:
warning: `"pkg-config" "--libs" "--cflags" "gtk4" "gtk4 >= 4.0.0"` did not exit successfully: exit code: 1
error: failed to run custom build command for `gtk4-sys v0.4.8`
Caused by:
  process didn't exit successfully: `C:\Users\USER\IdeaProjects\test_gtk_rust\target\debug\build\gtk4-sys-5943893200e051b6\build-script-build` (exit code: 1)
  --- stdout
  cargo:rerun-if-env-changed=GTK4_NO_PKG_CONFIG
  cargo:rerun-if-env-changed=PKG_CONFIG_x86_64-pc-windows-gnu
  cargo:rerun-if-env-changed=PKG_CONFIG_x86_64_pc_windows_gnu
  cargo:rerun-if-env-changed=HOST_PKG_CONFIG
  cargo:rerun-if-env-changed=PKG_CONFIG
  cargo:rerun-if-env-changed=PKG_CONFIG_PATH_x86_64-pc-windows-gnu
  cargo:rerun-if-env-changed=PKG_CONFIG_PATH_x86_64_pc_windows_gnu
  cargo:rerun-if-env-changed=HOST_PKG_CONFIG_PATH
  cargo:rerun-if-env-changed=PKG_CONFIG_PATH
  cargo:rerun-if-env-changed=PKG_CONFIG_LIBDIR_x86_64-pc-windows-gnu
  cargo:rerun-if-env-changed=PKG_CONFIG_LIBDIR_x86_64_pc_windows_gnu
  cargo:rerun-if-env-changed=HOST_PKG_CONFIG_LIBDIR
  cargo:rerun-if-env-changed=PKG_CONFIG_LIBDIR
  cargo:rerun-if-env-changed=PKG_CONFIG_SYSROOT_DIR_x86_64-pc-windows-gnu
  cargo:rerun-if-env-changed=PKG_CONFIG_SYSROOT_DIR_x86_64_pc_windows_gnu
  cargo:rerun-if-env-changed=HOST_PKG_CONFIG_SYSROOT_DIR
  cargo:rerun-if-env-changed=PKG_CONFIG_SYSROOT_DIR
  cargo:warning=`"pkg-config" "--libs" "--cflags" "gtk4" "gtk4 >= 4.0.0"` did not exit successfully: exit code: 1
  error: could not find system library 'gtk4' required by the 'gtk4-sys' crate
  --- stderr
  Package gtk4 was not found in the pkg-config search path.
  Perhaps you should add the directory containing `gtk4.pc'
  to the PKG_CONFIG_PATH environment variable
  No package 'gtk4' found
  Package gtk4 was not found in the pkg-config search path.
  Perhaps you should add the directory containing `gtk4.pc'
  to the PKG_CONFIG_PATH environment variable
  No package 'gtk4' found
The following warnings were emitted during compilation:
warning: `"pkg-config" "--libs" "--cflags" "cairo" "cairo >= 1.14"` did not exit successfully: exit code: 1
error: failed to run custom build command for `cairo-sys-rs v0.15.1`
Caused by:
  process didn't exit successfully: `C:\Users\USER\IdeaProjects\test_gtk_rust\target\debug\build\cairo-sys-rs-5336fb2cb3c77003\build-script-build` (exit code: 1)
  --- stdout
  cargo:rerun-if-env-changed=CAIRO_NO_PKG_CONFIG
  cargo:rerun-if-env-changed=PKG_CONFIG_x86_64-pc-windows-gnu
  cargo:rerun-if-env-changed=PKG_CONFIG_x86_64_pc_windows_gnu
  cargo:rerun-if-env-changed=HOST_PKG_CONFIG
  cargo:rerun-if-env-changed=PKG_CONFIG
  cargo:rerun-if-env-changed=PKG_CONFIG_PATH_x86_64-pc-windows-gnu
  cargo:rerun-if-env-changed=PKG_CONFIG_PATH_x86_64_pc_windows_gnu
  cargo:rerun-if-env-changed=HOST_PKG_CONFIG_PATH
  cargo:rerun-if-env-changed=PKG_CONFIG_PATH
  cargo:rerun-if-env-changed=PKG_CONFIG_LIBDIR_x86_64-pc-windows-gnu
  cargo:rerun-if-env-changed=PKG_CONFIG_LIBDIR_x86_64_pc_windows_gnu
  cargo:rerun-if-env-changed=HOST_PKG_CONFIG_LIBDIR
  cargo:rerun-if-env-changed=PKG_CONFIG_LIBDIR
  cargo:rerun-if-env-changed=PKG_CONFIG_SYSROOT_DIR_x86_64-pc-windows-gnu
  cargo:rerun-if-env-changed=PKG_CONFIG_SYSROOT_DIR_x86_64_pc_windows_gnu
  cargo:rerun-if-env-changed=HOST_PKG_CONFIG_SYSROOT_DIR
  cargo:rerun-if-env-changed=PKG_CONFIG_SYSROOT_DIR
  cargo:warning=`"pkg-config" "--libs" "--cflags" "cairo" "cairo >= 1.14"` did not exit successfully: exit code: 1
  error: could not find system library 'cairo' required by the 'cairo-sys-rs' crate
  --- stderr
  Package cairo was not found in the pkg-config search path.
  Perhaps you should add the directory containing `cairo.pc'
  to the PKG_CONFIG_PATH environment variable
  No package 'cairo' found
  Package cairo was not found in the pkg-config search path.
  Perhaps you should add the directory containing `cairo.pc'
  to the PKG_CONFIG_PATH environment variable
  No package 'cairo' found
Process finished with exit code 101
knightmar commented 2 years ago

here is

sdroege commented 2 years ago

Yeah you don't have GTK4 and its dependencies installed correctly on your system. It's not found from your environment.

knightmar commented 2 years ago

so how can I install it ? I really followed the tutorial

Hofer-Julian commented 2 years ago

You've also set the PKG_CONFIG_PATH env variable? https://gtk-rs.org/gtk4-rs/stable/latest/book/installation_windows.html#set-pkg_config_path-environment-variable

knightmar commented 2 years ago

huuuuh, i've restarted my pc and it works.. So thanks for your help, I thinks windows requires a reboot to include the new env variables

Hofer-Julian commented 2 years ago

huuuuh, i've restarted my pc and it works.. So thanks for your help, I thinks windows requires a reboot to include the new env variables

It shouldn't, but still glad to hear that it solved your problem :)

sdroege commented 2 years ago

It was necessary at least last time I used Windows 4-5 years ago :)

knightmar commented 2 years ago

Anyway, thank you both :D