1
0
mirror of https://github.com/vlang/v.git synced 2023-08-10 21:13:21 +03:00

make glfw work on Windows

This commit is contained in:
Alexander Medvednikov 2019-07-12 05:04:04 +02:00
parent 560ba55572
commit 28d379dc7b
3 changed files with 15 additions and 8 deletions

View File

@ -1 +1,12 @@
<img src='https://raw.githubusercontent.com/vlang/v/master/examples/tetris/screenshot.png' width=300>
Tetris has a temporary dependency on GLFW.
## macOS
`brew install glfw`
## Ubuntu
sudo apt install libglfw3 libglfw3-dev
## Windows
Copy `thirdparty/glfw/glfw3.dll` to this directory.

View File

@ -5,23 +5,19 @@
module glfw
#flag -I @VROOT/thirdparty/glfw
#flag windows @VROOT/thirdparty/glfw/libglfw3.a
#flag -L @VROOT/thirdparty/glfw
// Debugging a custom build
#flag darwin -L/var/tmp/glfw/src/
//-#flag darwin -L/var/tmp/glfw/src/
#flag darwin -lglfw
#flag linux -lglfw
#flag windows -I/usr/local/Cellar/glfw/3.2.1/include/
// #include <glad/glad.h> // !gen.go include GLFW.v
#flag windows -lglfw3
#include <GLFW/glfw3.h>
// #flag darwin -framework Carbon
// #flag darwin -framework Cocoa
// #flag darwin -framework CoreVideo
// #flag darwin -framework IOKit
// struct C.GL
// @GLFWwindow* C.glfwCreateWindow
// #int gconst_init = 0;
const (
RESIZABLE = 1
DECORATED = 2