I'm trying to get one of the glium examples (glium/tutorial-01.rs at master · glium/glium · GitHub) to compile, but it tells me it can't resolve a variable in the glutin package.
I shortened the example a bit, and I put glium = "*" in my dependencies as the project page says, and I've even tried manually putting glutin as a dependency (even though glium includes its own, as far as I can tell). Not sure what else to try because I'm new to Rust.
Here is my source file:
extern crate glium;
fn main() {
#[allow(unused_imports)]
use glium::{glutin, Surface};
let event_loop = glutin::event_loop::EventLoop::new();
let wb = glutin::window::WindowBuilder::new();
let cb = glutin::ContextBuilder::new();
let display = glium::Display::new(wb, cb, &event_loop).unwrap();
}
And the error message I get when building from the command line:
>cargo build
error[E0433]: failed to resolve: could not find `event_loop` in `glutin`
--> src\main.rs:7:30
|
7 | let event_loop = glutin::event_loop::EventLoop::new();
| ^^^^^^^^^^ could not find `event_loop` in `glut
in`
error[E0433]: failed to resolve: could not find `window` in `glutin`
--> src\main.rs:8:22
|
8 | let wb = glutin::window::WindowBuilder::new();
| ^^^^^^ could not find `window` in `glutin`
error: aborting due to 2 previous errors