Reputation: 1
I am new to rust and am setting up Rust on a new system, but I am having issues getting GTK4 to run. I created a simple "Hello World" program (opens a blank window titled "Hello World").
use gtk4 as gtk;
use gtk::prelude::*;
use gtk::{glib, Application, ApplicationWindow};
const APP_ID: &str = "HelloWorld";
fn main() -> glib::ExitCode {
// Create a new application
let app = Application::builder().application_id(APP_ID).build();
// Connect to the "activate" signal of `app`
app.connect_activate(build_ui);
// Run the application
app.run()
}
fn build_ui(app: &Application) {
// Create a window and set the title
let window = ApplicationWindow::builder()
.application(app)
.title("Hello, World!")
.build();
// Connect the close button to end the program
window.connect_close_request(|window| {
window.close();
glib::Propagation::Proceed
});
// Present window
window.present();
}
This runs as expected on the original computer, but when I tried running it on the new system, I get LINK : fatal error LNK1181: cannot open input file 'harfbuzz.lib'. What makes this error especially confusing is that I cannot find the file 'harfbuzz.lib' on my original system.
I have tried a number of ways to fix this problem:
What might work (but I don't know how to do):
Any help would be greatly appriciated, Thank You.
Upvotes: 0
Views: 113