title: Meson on windows with msys2 package linking error
body: <p>I installed <a href="https://github.com/AravisProject/aravis" rel="nofollow noreferrer">aravis</a> library as msys2 package, the information is <a href="https://packages.msys2.org/base/mingw-w64-aravis" rel="nofollow noreferrer">here</a>.<br />
  I construct simple C++ project which include the aravis with meson, and following is my <code>meson.build</code> file. (<code>glib-2.0</code> and <code>libxml2</code> are dependencies of <code>aravis</code> so I added. am I wrong?)</p>
  <pre><code>project('tutorial', 'cpp')
  cpp = meson.get_compiler('cpp')
  
  dep0 = cpp.find_library('glib-2.0', dirs: 'C:/msys64/mingw64')
  dep1 = cpp.find_library('libxml2', dirs: 'C:/msys64/mingw64')
  dep2 = cpp.find_library('aravis-0.8', dirs: 'C:/msys64/mingw64')
  
  cflags = include_directories('c:/msys64/mingw64/include/aravis-0.8', 'c:/msys64/mingw64/include/glib-2.0', 'C:/msys64/mingw64/lib/glib-2.0/include')
  
  executable('demo', 'main.cpp', include_directories : cflags, dependencies : [dep0, dep1, dep2])
  </code></pre>
  <p>.. and when I compile the project, it fails with following prints.</p>
  <pre><code>[2/2] Linking target demo.exe
  FAILED: demo.exe
  &quot;c++&quot;  -o demo.exe demo.exe.p/main.cpp.obj &quot;-Wl,--allow-shlib-undefined&quot; &quot;-Wl,--start-group&quot; &quot;C:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/11.2.0/../../../../lib/libglib-2.0.dll.a&quot; &quot;C:/msys64/mingw64/bin/../lib/gcc/x./lib/gcc/x86_64-w64-mingw32/11.2.0/../../../../lib/libxml2.dll.a&quot; &quot;C:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/11.2.0/../../../../lib/libaravis-0.8.dll.a&quot; &quot;-Wl,--subsystem,console&quot; &quot;-lkernel32&quot; &quot;-luser32di32&quot; lwpoo&quot; &quot;-lgdi32&quot; &quot;-lwinspool&quot; &quot;-lshell32&quot; &quot;-lole32&quot; &quot;-loleaut32&quot; &quot;-luuid&quot; &quot;-lcomdlg32&quot; &quot;-ladvapi32&quot; &quot;-Wl,--end-group&quot;
  C:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/11.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: demo.exe.p/main.cpp.obj:c:/msys64/mingw64/include/aravis-0.8/arvbuffer.h:90: undefined reference to `g_type_check_instanceck_instance_is_a'
  C:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/11.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: demo.exe.p/main.cpp.obj:c:/msys64/mingw64/include/aravis-0.8/arvcamera.h:39: undefined reference to `g_type_check_instanceck_instance_is_a'
  C:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/11.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: demo.exe.p/main.cpp.obj:C:\Users\woose\example\builddir/../main.cpp:26: undefined reference to `g_object_unref'       '
  C:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/11.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: demo.exe.p/main.cpp.obj: in function `main':
  C:\Users\woose\example\builddir/../main.cpp:30: undefined reference to `g_object_unref'
  collect2.exe: error: ld returned 1 exit status
  ninja: build stopped: subcommand failed.
  </code></pre>
  <p>I've couldn't figure it out what I missed. Anyone help?</p>