rustgtkrust-cargogtk-rs

Error LNK1181: cannot open input file 'gobject-2.0.lib'


I am trying to build a gtk-4 GUI application with the Rust in VScode, but I am unable to because I can't build my project. What could be the problem? How do I fix it?

Here's the error fatal error LNK1181: cannot open input file 'gobject-2.0.lib'

My Cargo.toml

[package]
name = "my-gtk-app"
version = "0.1.0"
edition = "2021"

[dependencies]
gtk = { version = "0.4.7", package = "gtk4", features = ["v4_6"]}

Solution

  • Building the project as an administrator fixed the problem.