diff options
| author | izimuth <ian.smithian@gmail.com> | 2024-01-14 09:50:07 -0800 |
|---|---|---|
| committer | Jussi Pakkanen <jpakkane@gmail.com> | 2024-01-15 20:22:04 +0200 |
| commit | 1c852f0a985f2daa42ca209008eebcd7a42fb58e (patch) | |
| tree | be5c5ebe287207dd55364c6fc4c1ac974540c998 /docs | |
| parent | ae857e841b0a6b9b595583e74f5e21676bb83f9d (diff) | |
| download | meson-1c852f0a985f2daa42ca209008eebcd7a42fb58e.tar.gz | |
Add a note for Windows users to GuiTutorial.md
When compiling on Windows using MSVC, you also need to link the SDL2main.lib file.
I've added a note to the GuiTutorial.md file to mention this.
Diffstat (limited to 'docs')
| -rw-r--r-- | docs/markdown/GuiTutorial.md | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/docs/markdown/GuiTutorial.md b/docs/markdown/GuiTutorial.md index 85930d7dc..568246060 100644 --- a/docs/markdown/GuiTutorial.md +++ b/docs/markdown/GuiTutorial.md @@ -170,6 +170,20 @@ executable('sdlprog', 'sdlprog.c', dependencies: sdl2_dep) ``` +**NOTE:** If you're on Windows you need to include the sdl2main dependency as well; To do so you can modify the above build script like so: + +```meson +project('sdldemo', 'c', + default_options: 'default_library=static') + +sdl2_dep = dependency('sdl2') +sdl2_main_dep = dependency('sdl2main') + +executable('sdlprog', 'sdlprog.c', + win_subsystem: 'windows', + dependencies: [sdl2_dep, sdl2_main_dep]) +``` + In addition to the dependency this has a few other changes. First we specify that we want to build helper libraries statically. For simple projects like these it makes things simpler. We also need to tell |
