Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // make sure you have GLFW3 installed on your system
- // run: zig build-exe -isystem /usr/include main.zig
- pub use @cImport({
- @cInclude("GLFW/glfw3.h");
- });
- const Tetris = struct {
- y : u8
- };
- var tetris_state: Tetris = undefined;
- pub fn main() void {
- const t = &tetris_state;
- glfwSetWindowUserPointer(null, @ptrCast(*c_void, t));
- }
- // Following error occurs:
- // Call parameter type does not match function signature!
- // %Tetris* @tetris_state
- // i8* call void @glfwSetWindowUserPointer(i8* null, %Tetris* @tetris_state), !dbg !12618
- // LLVM ERROR: Broken module found, compilation aborted!
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement