File tree Expand file tree Collapse file tree 1 file changed +30
-0
lines changed Expand file tree Collapse file tree 1 file changed +30
-0
lines changed Original file line number Diff line number Diff line change @@ -42,6 +42,36 @@ On Windows you can install SDL with `pacman` under [MSYS2](https://msys2.github.
42
42
> ghc-options: -optl-mconsole
43
43
> ```
44
44
45
+ ## Build errors
46
+
47
+ If you are getting build errors like `‘SDL_Vertex’ undeclared` then your installed libsdl2 version is missing some recent additions.
48
+ You have two options to mitigate this:
49
+ 1. Flip a package flag named `recent-ish` in your **project** configuration file.
50
+ * `cabal.project.local`:
51
+ ```yaml
52
+ package sdl2
53
+ flags: -recent-ish
54
+ ```
55
+ * `stack.yaml`:
56
+ ```yaml
57
+ flags:
58
+ sdl2:
59
+ recent-ish: false
60
+ ```
61
+ 2. Build SDL2 from source and use `extra-include-dirs` / `extra-lib-dirs` options:
62
+ * `cabal.project.local`:
63
+ ```yaml
64
+ extra-include-dirs: /path/to/sdl2/include
65
+ extra-lib-dirs: /path/to/sdl2/lib
66
+ ```
67
+ * `stack.yaml`:
68
+ ```yaml
69
+ extra-include-dirs:
70
+ - /path/to/sdl2/include
71
+ extra-lib-dirs:
72
+ - /path/to/sdl2/lib
73
+ ```
74
+
45
75
# Get Started
46
76
47
77
Take a look at the [getting started guide](https://hackage.haskell.org/package/sdl2/docs/SDL.html).
You can’t perform that action at this time.
0 commit comments