Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

window.rs:327:38: 327:67 error: mismatched types: expected *const std::os::raw::c_void, found *const libc::c_void #68

Closed
ghost opened this issue Nov 26, 2015 · 7 comments

Comments

@ghost
Copy link

ghost commented Nov 26, 2015

When attempting to build the readme sample (and installing opengl freeglut3-dev, and randr xorg-dev libglu1-mesa-dev) I'm getting this:

Executing: cargo build 
   Compiling kiss3d v0.1.4 (https://github.com/sebcrozet/kiss3d#98f00870)
~/.cargo/git/checkouts/kiss3d-fdfcc5cc23d2dd9f/master/src/window/window.rs:327:38: 327:67 error: mismatched types:
 expected `*const std::os::raw::c_void`,
    found `*const libc::c_void`
(expected enum `std::os::raw::c_void`,
    found enum `libc::c_void`) [E0308]
~/.cargo/git/checkouts/kiss3d-fdfcc5cc23d2dd9f/master/src/window/window.rs:327         verify!(gl::load_with(|name| window.get_proc_address(name)));
                                                                                                                              ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
~/.cargo/git/checkouts/kiss3d-fdfcc5cc23d2dd9f/master/src/window/window.rs:327:9: 327:70 note: in this expansion of verify! (defined in ~/.cargo/git/checkouts/kiss3d-fdfcc5cc23d2dd9f/master/src/error.rs)
~/.cargo/git/checkouts/kiss3d-fdfcc5cc23d2dd9f/master/src/window/window.rs:327:38: 327:67 help: run `rustc --explain E0308` to see a detailed explanation
error: aborting due to previous error
Could not compile `kiss3d`.

The readme says that the latest nightlies of rust are required, but that was edited a long time ago so is that still necessary?

@ghost
Copy link
Author

ghost commented Nov 26, 2015

I commented out the verify! line that the error references because to me it seemed like a somewhat optional assert kind of statement. That let it keep going but I still had errors with an ambiguous Vec3 in the sample which I changed to &na::Vec3::new... instead.

Now it builds through but at runtime I get thread '<main>' panicked at 'gl function was not loaded', ~/Projects/hello_world/target/debug/build/gl-f2eae2a83ed0cb03/out/bindings.rs:23202

@ghost
Copy link
Author

ghost commented Nov 26, 2015

I also tried removing those glut packages and installed glew instead but I get the same result.

@ticki ticki mentioned this issue Nov 28, 2015
@ticki
Copy link

ticki commented Nov 28, 2015

The readme says that the latest nightlies of rust are required, but that was edited a long time ago so is that still necessary?

Doesn't compile on latest (today's) nightlies.

@ticki
Copy link

ticki commented Nov 28, 2015

It works when doing transmute.

@ticki ticki mentioned this issue Nov 28, 2015
@ticki
Copy link

ticki commented Nov 28, 2015

Fixed by #70

@brendanzab
Copy link

This is due to the latest updates in gl-rs. glfw seems to be behind. Could you look into this @bvssvni?

@bvssvni
Copy link

bvssvni commented Nov 29, 2015

@bjz Looking. I ran into some minor issues that we might want to check first. PistonDevelopers/glfw-sys#5, PistonDevelopers/glfw-sys#6, PistonDevelopers/glfw-rs#331.

sebcrozet added a commit that referenced this issue Jan 30, 2016
Version of rustc: 1.8.0-nightly (38e23e8f7 2016-01-27)
Fix #68.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants