Closed miffe closed 4 years ago
You need to at least add win_subsystem
to your executable's kwargs. See for example https://github.com/jpakkane/sdltest/blob/master/meson.build
Adding win_subsystem: 'windows'
to executable
doesn't make a difference, still the same errors.
But adding default_options : ['default_library=static', 'buildtype=debugoptimized']
to project
from your example makes it work. It however links sdl2 statically, which is not ideal.
Sadly shared libraries on Windows are a bit of a pain. If you can get away with static libraries, they are usually simpler to get working.
Static sdl2 will work for me.
Thanks for meson btw, it's by far the nicest build system!
Versions
Windows 10 (20H2) (19042.572) (Clean install in a VM) Visual Studio 16.7.7 (With .NET desktop development & Desktop development with C++) Meson+Ninja combo installer 0.56.0
meson.build
example.c
From 'x86 Native Tools Command Prompt for VS 2019'
meson builddir
ninja -C builddir
"Solutions‽"
Adding
"vcruntimed.lib" "ucrtd.lib"
toLINK_ARGS
for thesdl2.dll
target in thebuild.ninja
file cuts the errors down to:No idea how to fix this last one.