edubart / nelua-lang

Minimal, efficient, statically-typed and meta-programmable systems programming language heavily inspired by Lua, which compiles to C and native code.
https://nelua.io
MIT License
1.99k stars 64 forks source link

snakesdl.nelua, libSDL2.a(SDL_hidapi.c.obj): undefined reference to `__imp_SetupDiGetClassDevsA' #194

Closed retsyo closed 2 years ago

retsyo commented 2 years ago

Bug description

I have build nelua from latest cloned source in MSYS2+MingW64 on windows 10 64 bits,

$ ./nelua --version
Nelua 0.2.0-dev
Build number: 1529
Git date: 2022-09-07 14:39:31 -0300
Git hash: 9de66a3c980c625448a8a85c71a059cb9ae3542b
Semantic version: 0.2.0-dev.1529+9de66a3c
Copyright (C) 2019-2022 Eduardo Bart (https://nelua.io/)

and installed SDL2

$ pacman -S mingw-w64-x86_64-SDL2
warning: mingw-w64-x86_64-SDL2-2.0.22-2 is up to date -- reinstalling
resolving dependencies...
looking for conflicting packages...

Packages (1) mingw-w64-x86_64-SDL2-2.0.22-2

Total Installed Size:  7.18 MiB
Net Upgrade Size:      0.00 MiB

:: Proceed with installation? [Y/n]

however, when I try to compile snakesdl.nelua which is supplied in your nelua, I get

$ ./nelua -V -s --output snake_nelua.exe examples/snakesdl.nelua
using cached generated E:\msys64\home\Lenovo\.cache\nelua\snakesdl.c
x86_64-w64-mingw32-gcc -x c "E:\msys64\home\Lenovo\.cache\nelua\snakesdl.c" -x none -fwrapv -fno-strict-aliasing -g  -O3 -static-libgcc -Wl,--kill-at -static -lSDL2 -o "snake_nelua.exe"
E:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/12.1.0/../../../../x86_64-w64-mingw32/bin/ld.exe: E:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/12.1.0/../../../../lib\libSDL2.a(SDL_hidapi.c.obj):(.text+0x103c): undefined reference to `__imp_SetupDiGetClassDevsA'
E:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/12.1.0/../../../../x86_64-w64-mingw32/bin/ld.exe: E:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/12.1.0/../../../../lib\libSDL2.a(SDL_hidapi.c.obj):(.text+0x1043): undefined reference to `__imp_SetupDiEnumDeviceInterfaces'
E:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/12.1.0/../../../../x86_64-w64-mingw32/bin/ld.exe: E:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/12.1.0/../../../../lib\libSDL2.a(SDL_hidapi.c.obj):(.text+0x1053): undefined reference to `__imp_SetupDiGetDeviceInterfaceDetailA'
E:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/12.1.0/../../../../x86_64-w64-mingw32/bin/ld.exe: E:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/12.1.0/../../../../lib\libSDL2.a(SDL_hidapi.c.obj):(.text+0x111e): undefined reference to `__imp_SetupDiEnumDeviceInfo'
E:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/12.1.0/../../../../x86_64-w64-mingw32/bin/ld.exe: E:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/12.1.0/../../../../lib\libSDL2.a(SDL_hidapi.c.obj):(.text+0x112d): undefined reference to `__imp_SetupDiGetDeviceRegistryPropertyA'
E:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/12.1.0/../../../../x86_64-w64-mingw32/bin/ld.exe: E:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/12.1.0/../../../../lib\libSDL2.a(SDL_hidapi.c.obj):(.text+0x1255): undefined reference to `__imp_SetupDiDestroyDeviceInfoList'
E:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/12.1.0/../../../../x86_64-w64-mingw32/bin/ld.exe: E:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/12.1.0/../../../../lib\libSDL2.a(SDL_windows.c.obj):(.text+0x1aa): undefined reference to `__imp_CoInitializeEx'
E:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/12.1.0/../../../../x86_64-w64-mingw32/bin/ld.exe: E:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/12.1.0/../../../../lib\libSDL2.a(SDL_windows.c.obj):(.text+0x1f3): undefined reference to `__imp_CoUninitialize'
E:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/12.1.0/../../../../x86_64-w64-mingw32/bin/ld.exe: E:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/12.1.0/../../../../lib\libSDL2.a(SDL_windowsevents.c.obj):(.text+0x2a9): undefined reference to `__imp_CreateDCW'
E:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/12.1.0/../../../../x86_64-w64-mingw32/bin/ld.exe: E:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/12.1.0/../../../../lib\libSDL2.a(SDL_windowsevents.c.obj):(.text+0x2c7): undefined reference to `__imp_GetICMProfileW'
E:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/12.1.0/../../../../x86_64-w64-mingw32/bin/ld.exe: E:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/12.1.0/../../../../lib\libSDL2.a(SDL_windowsevents.c.obj):(.text+0x2d2): undefined reference to `__imp_DeleteDC'
E:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/12.1.0/../../../../x86_64-w64-mingw32/bin/ld.exe: E:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/12.1.0/../../../../lib\libSDL2.a(SDL_windowskeyboard.c.obj):(.text+0x56): undefined reference to `ImmGetIMEFileNameA'
E:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/12.1.0/../../../../x86_64-w64-mingw32/bin/ld.exe: E:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/12.1.0/../../../../lib\libSDL2.a(SDL_windowskeyboard.c.obj):(.text+0xa4): undefined reference to `ImmGetContext'
E:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/12.1.0/../../../../x86_64-w64-mingw32/bin/ld.exe: E:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/12.1.0/../../../../lib\libSDL2.a(SDL_windowskeyboard.c.obj):(.text+0xc3): undefined reference to `ImmReleaseContext'
E:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/12.1.0/../../../../x86_64-w64-mingw32/bin/ld.exe: E:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/12.1.0/../../../../lib\libSDL2.a(SDL_windowskeyboard.c.obj):(.text+0x127): undefined reference to `ImmGetCompositionStringW'
E:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/12.1.0/../../../../x86_64-w64-mingw32/bin/ld.exe: E:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/12.1.0/../../../../lib\libSDL2.a(SDL_windowskeyboard.c.obj):(.text+0x148): undefined reference to `ImmGetCompositionStringW'
E:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/12.1.0/../../../../x86_64-w64-mingw32/bin/ld.exe: E:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/12.1.0/../../../../lib\libSDL2.a(SDL_windowskeyboard.c.obj):(.text+0x16a): undefined reference to `ImmGetCompositionStringW'
E:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/12.1.0/../../../../x86_64-w64-mingw32/bin/ld.exe: E:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/12.1.0/../../../../lib\libSDL2.a(SDL_windowskeyboard.c.obj):(.text+0x27f): undefined reference to `ImmGetCompositionStringW'
E:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/12.1.0/../../../../x86_64-w64-mingw32/bin/ld.exe: E:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/12.1.0/../../../../lib\libSDL2.a(SDL_windowskeyboard.c.obj):(.text+0x2ba): undefined reference to `ImmGetCompositionStringW'
E:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/12.1.0/../../../../x86_64-w64-mingw32/bin/ld.exe: E:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/12.1.0/../../../../lib\libSDL2.a(SDL_windowskeyboard.c.obj):(.text+0x507): undefined reference to `ImmGetIMEFileNameA'
E:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/12.1.0/../../../../x86_64-w64-mingw32/bin/ld.exe: E:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/12.1.0/../../../../lib\libSDL2.a(SDL_windowskeyboard.c.obj):(.text+0x641): undefined reference to `GetFileVersionInfoSizeA'
E:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/12.1.0/../../../../x86_64-w64-mingw32/bin/ld.exe: E:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/12.1.0/../../../../lib\libSDL2.a(SDL_windowskeyboard.c.obj):(.text+0x66c): undefined reference to `GetFileVersionInfoA'
E:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/12.1.0/../../../../x86_64-w64-mingw32/bin/ld.exe: E:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/12.1.0/../../../../lib\libSDL2.a(SDL_windowskeyboard.c.obj):(.text+0x6cf): undefined reference to `VerQueryValueA'
E:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/12.1.0/../../../../x86_64-w64-mingw32/bin/ld.exe: E:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/12.1.0/../../../../lib\libSDL2.a(SDL_windowskeyboard.c.obj):(.text+0x89e): undefined reference to `ImmGetContext'
E:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/12.1.0/../../../../x86_64-w64-mingw32/bin/ld.exe: E:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/12.1.0/../../../../lib\libSDL2.a(SDL_windowskeyboard.c.obj):(.text+0x8c0): undefined reference to `ImmNotifyIME'
E:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/12.1.0/../../../../x86_64-w64-mingw32/bin/ld.exe: E:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/12.1.0/../../../../lib\libSDL2.a(SDL_windowskeyboard.c.obj):(.text+0x8dd): undefined reference to `ImmNotifyIME'
E:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/12.1.0/../../../../x86_64-w64-mingw32/bin/ld.exe: E:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/12.1.0/../../../../lib\libSDL2.a(SDL_windowskeyboard.c.obj):(.text+0x8e9): undefined reference to `ImmReleaseContext'
E:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/12.1.0/../../../../x86_64-w64-mingw32/bin/ld.exe: E:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/12.1.0/../../../../lib\libSDL2.a(SDL_windowskeyboard.c.obj):(.text+0x92b): undefined reference to `ImmSetCompositionStringW'
E:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/12.1.0/../../../../x86_64-w64-mingw32/bin/ld.exe: E:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/12.1.0/../../../../lib\libSDL2.a(SDL_windowskeyboard.c.obj):(.text+0xa3d): undefined reference to `__imp_SysFreeString'
E:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/12.1.0/../../../../x86_64-w64-mingw32/bin/ld.exe: E:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/12.1.0/../../../../lib\libSDL2.a(SDL_windowskeyboard.c.obj):(.text+0xc63): undefined reference to `ImmAssociateContext'
E:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/12.1.0/../../../../x86_64-w64-mingw32/bin/ld.exe: E:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/12.1.0/../../../../lib\libSDL2.a(SDL_windowskeyboard.c.obj):(.text+0xd43): undefined reference to `ImmGetContext'
E:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/12.1.0/../../../../x86_64-w64-mingw32/bin/ld.exe: E:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/12.1.0/../../../../lib\libSDL2.a(SDL_windowskeyboard.c.obj):(.text+0xd52): undefined reference to `ImmReleaseContext'
E:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/12.1.0/../../../../x86_64-w64-mingw32/bin/ld.exe: E:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/12.1.0/../../../../lib\libSDL2.a(SDL_windowskeyboard.c.obj):(.text+0xe45): undefined reference to `__imp_CoCreateInstance'
E:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/12.1.0/../../../../x86_64-w64-mingw32/bin/ld.exe: E:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/12.1.0/../../../../lib\libSDL2.a(SDL_windowskeyboard.c.obj):(.text+0x12c4): undefined reference to `__imp_SysFreeString'
E:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/12.1.0/../../../../x86_64-w64-mingw32/bin/ld.exe: E:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/12.1.0/../../../../lib\libSDL2.a(SDL_windowskeyboard.c.obj):(.text+0x13f9): undefined reference to `__imp_SysFreeString'
E:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/12.1.0/../../../../x86_64-w64-mingw32/bin/ld.exe: E:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/12.1.0/../../../../lib\libSDL2.a(SDL_windowskeyboard.c.obj):(.text+0x179d): undefined reference to `ImmAssociateContext'
E:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/12.1.0/../../../../x86_64-w64-mingw32/bin/ld.exe: E:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/12.1.0/../../../../lib\libSDL2.a(SDL_windowskeyboard.c.obj):(.text+0x1a28): undefined reference to `__imp_CoCreateInstance'
E:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/12.1.0/../../../../x86_64-w64-mingw32/bin/ld.exe: E:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/12.1.0/../../../../lib\libSDL2.a(SDL_windowskeyboard.c.obj):(.text+0x1a45): undefined reference to `ImmAssociateContext'
E:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/12.1.0/../../../../x86_64-w64-mingw32/bin/ld.exe: E:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/12.1.0/../../../../lib\libSDL2.a(SDL_windowskeyboard.c.obj):(.text+0x1b68): undefined reference to `__imp_CoCreateInstance'
E:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/12.1.0/../../../../x86_64-w64-mingw32/bin/ld.exe: E:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/12.1.0/../../../../lib\libSDL2.a(SDL_windowskeyboard.c.obj):(.text+0x1b73): undefined reference to `ImmAssociateContext'
E:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/12.1.0/../../../../x86_64-w64-mingw32/bin/ld.exe: E:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/12.1.0/../../../../lib\libSDL2.a(SDL_windowskeyboard.c.obj):(.text+0x1ba6): undefined reference to `ImmGetContext'
E:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/12.1.0/../../../../x86_64-w64-mingw32/bin/ld.exe: E:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/12.1.0/../../../../lib\libSDL2.a(SDL_windowskeyboard.c.obj):(.text+0x1bf3): undefined reference to `ImmSetCompositionWindow'
E:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/12.1.0/../../../../x86_64-w64-mingw32/bin/ld.exe: E:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/12.1.0/../../../../lib\libSDL2.a(SDL_windowskeyboard.c.obj):(.text+0x1c38): undefined reference to `ImmSetCandidateWindow'
E:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/12.1.0/../../../../x86_64-w64-mingw32/bin/ld.exe: E:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/12.1.0/../../../../lib\libSDL2.a(SDL_windowskeyboard.c.obj):(.text+0x1c44): undefined reference to `ImmReleaseContext'
E:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/12.1.0/../../../../x86_64-w64-mingw32/bin/ld.exe: E:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/12.1.0/../../../../lib\libSDL2.a(SDL_windowskeyboard.c.obj):(.text+0x1d30): undefined reference to `ImmGetContext'
E:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/12.1.0/../../../../x86_64-w64-mingw32/bin/ld.exe: E:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/12.1.0/../../../../lib\libSDL2.a(SDL_windowskeyboard.c.obj):(.text+0x1d7e): undefined reference to `ImmReleaseContext'
E:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/12.1.0/../../../../x86_64-w64-mingw32/bin/ld.exe: E:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/12.1.0/../../../../lib\libSDL2.a(SDL_windowskeyboard.c.obj):(.text+0x1f75): undefined reference to `ImmGetContext'
E:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/12.1.0/../../../../x86_64-w64-mingw32/bin/ld.exe: E:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/12.1.0/../../../../lib\libSDL2.a(SDL_windowskeyboard.c.obj):(.text+0x1f91): undefined reference to `ImmGetCandidateListW'
E:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/12.1.0/../../../../x86_64-w64-mingw32/bin/ld.exe: E:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/12.1.0/../../../../lib\libSDL2.a(SDL_windowskeyboard.c.obj):(.text+0x1fa7): undefined reference to `ImmReleaseContext'
E:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/12.1.0/../../../../x86_64-w64-mingw32/bin/ld.exe: E:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/12.1.0/../../../../lib\libSDL2.a(SDL_windowskeyboard.c.obj):(.text+0x202f): undefined reference to `ImmGetContext'
E:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/12.1.0/../../../../x86_64-w64-mingw32/bin/ld.exe: E:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/12.1.0/../../../../lib\libSDL2.a(SDL_windowskeyboard.c.obj):(.text+0x20c6): undefined reference to `ImmReleaseContext'
E:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/12.1.0/../../../../x86_64-w64-mingw32/bin/ld.exe: E:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/12.1.0/../../../../lib\libSDL2.a(SDL_windowskeyboard.c.obj):(.text+0x2387): undefined reference to `ImmGetCandidateListW'
E:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/12.1.0/../../../../x86_64-w64-mingw32/bin/ld.exe: E:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/12.1.0/../../../../lib\libSDL2.a(SDL_windowskeyboard.c.obj):(.text+0x25c4): undefined reference to `__imp_CreateCompatibleDC'
E:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/12.1.0/../../../../x86_64-w64-mingw32/bin/ld.exe: E:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/12.1.0/../../../../lib\libSDL2.a(SDL_windowskeyboard.c.obj):(.text+0x25dc): undefined reference to `__imp_DeleteDC'
E:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/12.1.0/../../../../x86_64-w64-mingw32/bin/ld.exe: E:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/12.1.0/../../../../lib\libSDL2.a(SDL_windowskeyboard.c.obj):(.text+0x260a): undefined reference to `__imp_CreatePen'
E:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/12.1.0/../../../../x86_64-w64-mingw32/bin/ld.exe: E:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/12.1.0/../../../../lib\libSDL2.a(SDL_windowskeyboard.c.obj):(.text+0x2632): undefined reference to `__imp_CreateSolidBrush'
E:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/12.1.0/../../../../x86_64-w64-mingw32/bin/ld.exe: E:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/12.1.0/../../../../lib\libSDL2.a(SDL_windowskeyboard.c.obj):(.text+0x271c): undefined reference to `__imp_CreateFontW'
E:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/12.1.0/../../../../x86_64-w64-mingw32/bin/ld.exe: E:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/12.1.0/../../../../lib\libSDL2.a(SDL_windowskeyboard.c.obj):(.text+0x2723): undefined reference to `__imp_SetBkMode'
E:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/12.1.0/../../../../x86_64-w64-mingw32/bin/ld.exe: E:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/12.1.0/../../../../lib\libSDL2.a(SDL_windowskeyboard.c.obj):(.text+0x2745): undefined reference to `__imp_SelectObject'
E:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/12.1.0/../../../../x86_64-w64-mingw32/bin/ld.exe: E:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/12.1.0/../../../../lib\libSDL2.a(SDL_windowskeyboard.c.obj):(.text+0x27b6): undefined reference to `__imp_GetTextExtentPoint32W'
E:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/12.1.0/../../../../x86_64-w64-mingw32/bin/ld.exe: E:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/12.1.0/../../../../lib\libSDL2.a(SDL_windowskeyboard.c.obj):(.text+0x28ad): undefined reference to `__imp_CreateDIBSection'
E:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/12.1.0/../../../../x86_64-w64-mingw32/bin/ld.exe: E:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/12.1.0/../../../../lib\libSDL2.a(SDL_windowskeyboard.c.obj):(.text+0x2904): undefined reference to `__imp_Rectangle'
E:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/12.1.0/../../../../x86_64-w64-mingw32/bin/ld.exe: E:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/12.1.0/../../../../lib\libSDL2.a(SDL_windowskeyboard.c.obj):(.text+0x2937): undefined reference to `__imp_SetTextColor'
E:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/12.1.0/../../../../x86_64-w64-mingw32/bin/ld.exe: E:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/12.1.0/../../../../lib\libSDL2.a(SDL_windowskeyboard.c.obj):(.text+0x2ac6): undefined reference to `__imp_ExtTextOutW'
E:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/12.1.0/../../../../x86_64-w64-mingw32/bin/ld.exe: E:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/12.1.0/../../../../lib\libSDL2.a(SDL_windowskeyboard.c.obj):(.text+0x2af5): undefined reference to `__imp_DeleteObject'
E:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/12.1.0/../../../../x86_64-w64-mingw32/bin/ld.exe: E:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/12.1.0/../../../../lib\libSDL2.a(SDL_windowskeyboard.c.obj):(.text+0x2b01): undefined reference to `__imp_DeleteObject'
E:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/12.1.0/../../../../x86_64-w64-mingw32/bin/ld.exe: E:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/12.1.0/../../../../lib\libSDL2.a(SDL_windowskeyboard.c.obj):(.text+0x2cae): undefined reference to `__imp_ExtTextOutW'
E:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/12.1.0/../../../../x86_64-w64-mingw32/bin/ld.exe: E:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/12.1.0/../../../../lib\libSDL2.a(SDL_windowskeyboard.c.obj):(.text+0x2f55): undefined reference to `ImmGetContext'
E:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/12.1.0/../../../../x86_64-w64-mingw32/bin/ld.exe: E:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/12.1.0/../../../../lib\libSDL2.a(SDL_windowskeyboard.c.obj):(.text+0x2f73): undefined reference to `ImmNotifyIME'
E:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/12.1.0/../../../../x86_64-w64-mingw32/bin/ld.exe: E:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/12.1.0/../../../../lib\libSDL2.a(SDL_windowskeyboard.c.obj):(.text+0x2f90): undefined reference to `ImmNotifyIME'
E:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/12.1.0/../../../../x86_64-w64-mingw32/bin/ld.exe: E:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/12.1.0/../../../../lib\libSDL2.a(SDL_windowskeyboard.c.obj):(.text+0x2f9c): undefined reference to `ImmReleaseContext'
E:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/12.1.0/../../../../x86_64-w64-mingw32/bin/ld.exe: E:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/12.1.0/../../../../lib\libSDL2.a(SDL_windowskeyboard.c.obj):(.text+0x2fe3): undefined reference to `ImmSetCompositionStringW'
E:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/12.1.0/../../../../x86_64-w64-mingw32/bin/ld.exe: E:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/12.1.0/../../../../lib\libSDL2.a(SDL_windowsmessagebox.c.obj):(.text+0x850): undefined reference to `__imp_CreateCompatibleDC'
E:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/12.1.0/../../../../x86_64-w64-mingw32/bin/ld.exe: E:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/12.1.0/../../../../lib\libSDL2.a(SDL_windowsmessagebox.c.obj):(.text+0x8f0): undefined reference to `__imp_CreateFontIndirectW'
E:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/12.1.0/../../../../x86_64-w64-mingw32/bin/ld.exe: E:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/12.1.0/../../../../lib\libSDL2.a(SDL_windowsmessagebox.c.obj):(.text+0x8fc): undefined reference to `__imp_SelectObject'
E:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/12.1.0/../../../../x86_64-w64-mingw32/bin/ld.exe: E:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/12.1.0/../../../../lib\libSDL2.a(SDL_windowsmessagebox.c.obj):(.text+0x908): undefined reference to `__imp_GetTextMetricsW'
E:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/12.1.0/../../../../x86_64-w64-mingw32/bin/ld.exe: E:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/12.1.0/../../../../lib\libSDL2.a(SDL_windowsmessagebox.c.obj):(.text+0x921): undefined reference to `__imp_GetTextExtentPoint32A'
E:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/12.1.0/../../../../x86_64-w64-mingw32/bin/ld.exe: E:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/12.1.0/../../../../lib\libSDL2.a(SDL_windowsmessagebox.c.obj):(.text+0x9d1): undefined reference to `__imp_DeleteDC'
E:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/12.1.0/../../../../x86_64-w64-mingw32/bin/ld.exe: E:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/12.1.0/../../../../lib\libSDL2.a(SDL_windowsmessagebox.c.obj):(.text+0xbda): undefined reference to `__imp_GetDeviceCaps'
E:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/12.1.0/../../../../x86_64-w64-mingw32/bin/ld.exe: E:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/12.1.0/../../../../lib\libSDL2.a(SDL_windowsmodes.c.obj):(.text+0x42): undefined reference to `__imp_CreateDCW'
E:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/12.1.0/../../../../x86_64-w64-mingw32/bin/ld.exe: E:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/12.1.0/../../../../lib\libSDL2.a(SDL_windowsmodes.c.obj):(.text+0x83): undefined reference to `__imp_GetDeviceCaps'
E:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/12.1.0/../../../../x86_64-w64-mingw32/bin/ld.exe: E:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/12.1.0/../../../../lib\libSDL2.a(SDL_windowsmodes.c.obj):(.text+0xd0): undefined reference to `__imp_CreateCompatibleBitmap'
E:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/12.1.0/../../../../x86_64-w64-mingw32/bin/ld.exe: E:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/12.1.0/../../../../lib\libSDL2.a(SDL_windowsmodes.c.obj):(.text+0xe5): undefined reference to `__imp_GetDIBits'
E:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/12.1.0/../../../../x86_64-w64-mingw32/bin/ld.exe: E:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/12.1.0/../../../../lib\libSDL2.a(SDL_windowsmodes.c.obj):(.text+0x133): undefined reference to `__imp_DeleteObject'
E:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/12.1.0/../../../../x86_64-w64-mingw32/bin/ld.exe: E:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/12.1.0/../../../../lib\libSDL2.a(SDL_windowsmodes.c.obj):(.text+0x13c): undefined reference to `__imp_DeleteDC'
E:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/12.1.0/../../../../x86_64-w64-mingw32/bin/ld.exe: E:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/12.1.0/../../../../lib\libSDL2.a(SDL_windowsmodes.c.obj):(.text+0x83a): undefined reference to `__imp_GetDeviceCaps'
E:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/12.1.0/../../../../x86_64-w64-mingw32/bin/ld.exe: E:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/12.1.0/../../../../lib\libSDL2.a(SDL_windowsmouse.c.obj):(.text+0x281): undefined reference to `__imp_CreateDIBSection'
E:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/12.1.0/../../../../x86_64-w64-mingw32/bin/ld.exe: E:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/12.1.0/../../../../lib\libSDL2.a(SDL_windowsmouse.c.obj):(.text+0x2a4): undefined reference to `__imp_CreateBitmap'
E:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/12.1.0/../../../../x86_64-w64-mingw32/bin/ld.exe: E:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/12.1.0/../../../../lib\libSDL2.a(SDL_windowsmouse.c.obj):(.text+0x2e3): undefined reference to `__imp_DeleteObject'
E:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/12.1.0/../../../../x86_64-w64-mingw32/bin/ld.exe: E:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/12.1.0/../../../../lib\libSDL2.a(SDL_windowsmouse.c.obj):(.text+0x3df): undefined reference to `__imp_CreateDIBSection'
E:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/12.1.0/../../../../x86_64-w64-mingw32/bin/ld.exe: E:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/12.1.0/../../../../lib\libSDL2.a(SDL_windowsmouse.c.obj):(.text+0x402): undefined reference to `__imp_CreateBitmap'
E:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/12.1.0/../../../../x86_64-w64-mingw32/bin/ld.exe: E:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/12.1.0/../../../../lib\libSDL2.a(SDL_windowsshape.c.obj):(.text+0x41): undefined reference to `__imp_CreateRectRgn'
E:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/12.1.0/../../../../x86_64-w64-mingw32/bin/ld.exe: E:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/12.1.0/../../../../lib\libSDL2.a(SDL_windowsshape.c.obj):(.text+0x5e): undefined reference to `__imp_CombineRgn'
E:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/12.1.0/../../../../x86_64-w64-mingw32/bin/ld.exe: E:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/12.1.0/../../../../lib\libSDL2.a(SDL_windowsshape.c.obj):(.text+0x6f): undefined reference to `__imp_DeleteObject'
E:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/12.1.0/../../../../x86_64-w64-mingw32/bin/ld.exe: E:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/12.1.0/../../../../lib\libSDL2.a(SDL_windowswindow.c.obj):(.text+0xe5f): undefined reference to `__imp_CreateDCW'
E:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/12.1.0/../../../../x86_64-w64-mingw32/bin/ld.exe: E:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/12.1.0/../../../../lib\libSDL2.a(SDL_windowswindow.c.obj):(.text+0xe73): undefined reference to `__imp_SetDeviceGammaRamp'
E:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/12.1.0/../../../../x86_64-w64-mingw32/bin/ld.exe: E:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/12.1.0/../../../../lib\libSDL2.a(SDL_windowswindow.c.obj):(.text+0xe80): undefined reference to `__imp_DeleteDC'
E:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/12.1.0/../../../../x86_64-w64-mingw32/bin/ld.exe: E:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/12.1.0/../../../../lib\libSDL2.a(SDL_windowswindow.c.obj):(.text+0xea1): undefined reference to `__imp_DeleteDC'
E:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/12.1.0/../../../../x86_64-w64-mingw32/bin/ld.exe: E:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/12.1.0/../../../../lib\libSDL2.a(SDL_windowswindow.c.obj):(.text+0xeec): undefined reference to `__imp_CreateDCW'
E:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/12.1.0/../../../../x86_64-w64-mingw32/bin/ld.exe: E:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/12.1.0/../../../../lib\libSDL2.a(SDL_windowswindow.c.obj):(.text+0xf0a): undefined reference to `__imp_GetICMProfileW'
E:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/12.1.0/../../../../x86_64-w64-mingw32/bin/ld.exe: E:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/12.1.0/../../../../lib\libSDL2.a(SDL_windowswindow.c.obj):(.text+0xf15): undefined reference to `__imp_DeleteDC'
E:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/12.1.0/../../../../x86_64-w64-mingw32/bin/ld.exe: E:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/12.1.0/../../../../lib\libSDL2.a(SDL_windowswindow.c.obj):(.text+0xf9f): undefined reference to `__imp_CreateDCW'
E:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/12.1.0/../../../../x86_64-w64-mingw32/bin/ld.exe: E:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/12.1.0/../../../../lib\libSDL2.a(SDL_windowswindow.c.obj):(.text+0xfb3): undefined reference to `__imp_GetDeviceGammaRamp'
E:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/12.1.0/../../../../x86_64-w64-mingw32/bin/ld.exe: E:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/12.1.0/../../../../lib\libSDL2.a(SDL_windowswindow.c.obj):(.text+0xfc0): undefined reference to `__imp_DeleteDC'
E:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/12.1.0/../../../../x86_64-w64-mingw32/bin/ld.exe: E:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/12.1.0/../../../../lib\libSDL2.a(SDL_windowswindow.c.obj):(.text+0xfe1): undefined reference to `__imp_DeleteDC'
E:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/12.1.0/../../../../x86_64-w64-mingw32/bin/ld.exe: E:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/12.1.0/../../../../lib\libSDL2.a(SDL_windowssensor.c.obj):(.text+0x6a1): undefined reference to `__imp_SysFreeString'
E:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/12.1.0/../../../../x86_64-w64-mingw32/bin/ld.exe: E:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/12.1.0/../../../../lib\libSDL2.a(SDL_windowssensor.c.obj):(.text+0x847): undefined reference to `__imp_CoCreateInstance'
E:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/12.1.0/../../../../x86_64-w64-mingw32/bin/ld.exe: E:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/12.1.0/../../../../lib\libSDL2.a(SDL_systimer.c.obj):(.text+0x42): undefined reference to `__imp_timeBeginPeriod'
E:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/12.1.0/../../../../x86_64-w64-mingw32/bin/ld.exe: E:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/12.1.0/../../../../lib\libSDL2.a(SDL_systimer.c.obj):(.text+0x72): undefined reference to `__imp_timeEndPeriod'
E:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/12.1.0/../../../../x86_64-w64-mingw32/bin/ld.exe: E:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/12.1.0/../../../../lib\libSDL2.a(SDL_systimer.c.obj):(.text+0x88): undefined reference to `__imp_timeEndPeriod'
E:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/12.1.0/../../../../x86_64-w64-mingw32/bin/ld.exe: E:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/12.1.0/../../../../lib\libSDL2.a(SDL_systimer.c.obj):(.text+0x126): undefined reference to `__imp_timeEndPeriod'
E:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/12.1.0/../../../../x86_64-w64-mingw32/bin/ld.exe: E:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/12.1.0/../../../../lib\libSDL2.a(SDL_windows_gaming_input.c.obj):(.text+0xfcf): undefined reference to `__imp_CM_Locate_DevNodeA'
E:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/12.1.0/../../../../x86_64-w64-mingw32/bin/ld.exe: E:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/12.1.0/../../../../lib\libSDL2.a(SDL_windows_gaming_input.c.obj):(.text+0x1014): undefined reference to `__imp_CM_Get_Parent'
E:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/12.1.0/../../../../x86_64-w64-mingw32/bin/ld.exe: E:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/12.1.0/../../../../lib\libSDL2.a(SDL_windows_gaming_input.c.obj):(.text+0x104d): undefined reference to `__imp_CM_Get_Device_IDA'
E:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/12.1.0/../../../../x86_64-w64-mingw32/bin/ld.exe: E:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/12.1.0/../../../../lib\libSDL2.a(SDL_dinputhaptic.c.obj):(.text+0x114a): undefined reference to `__imp_CoCreateInstance'
E:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/12.1.0/../../../../x86_64-w64-mingw32/bin/ld.exe: E:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/12.1.0/../../../../lib\libSDL2.a(SDL_winmm.c.obj):(.text+0xc9): undefined reference to `__imp_waveOutReset'
E:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/12.1.0/../../../../x86_64-w64-mingw32/bin/ld.exe: E:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/12.1.0/../../../../lib\libSDL2.a(SDL_winmm.c.obj):(.text+0xf5): undefined reference to `__imp_waveOutClose'
E:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/12.1.0/../../../../x86_64-w64-mingw32/bin/ld.exe: E:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/12.1.0/../../../../lib\libSDL2.a(SDL_winmm.c.obj):(.text+0x10b): undefined reference to `__imp_waveInReset'
E:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/12.1.0/../../../../x86_64-w64-mingw32/bin/ld.exe: E:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/12.1.0/../../../../lib\libSDL2.a(SDL_winmm.c.obj):(.text+0x130): undefined reference to `__imp_waveInClose'
E:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/12.1.0/../../../../x86_64-w64-mingw32/bin/ld.exe: E:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/12.1.0/../../../../lib\libSDL2.a(SDL_winmm.c.obj):(.text+0x180): undefined reference to `__imp_waveInUnprepareHeader'
E:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/12.1.0/../../../../x86_64-w64-mingw32/bin/ld.exe: E:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/12.1.0/../../../../lib\libSDL2.a(SDL_winmm.c.obj):(.text+0x1a0): undefined reference to `__imp_waveInUnprepareHeader'
E:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/12.1.0/../../../../x86_64-w64-mingw32/bin/ld.exe: E:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/12.1.0/../../../../lib\libSDL2.a(SDL_winmm.c.obj):(.text+0x1cf): undefined reference to `__imp_waveOutUnprepareHeader'
E:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/12.1.0/../../../../x86_64-w64-mingw32/bin/ld.exe: E:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/12.1.0/../../../../lib\libSDL2.a(SDL_winmm.c.obj):(.text+0x1ef): undefined reference to `__imp_waveOutUnprepareHeader'
E:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/12.1.0/../../../../x86_64-w64-mingw32/bin/ld.exe: E:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/12.1.0/../../../../lib\libSDL2.a(SDL_winmm.c.obj):(.text+0x297): undefined reference to `__imp_waveInAddBuffer'
E:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/12.1.0/../../../../x86_64-w64-mingw32/bin/ld.exe: E:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/12.1.0/../../../../lib\libSDL2.a(SDL_winmm.c.obj):(.text+0x30e): undefined reference to `__imp_waveOutWrite'
E:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/12.1.0/../../../../x86_64-w64-mingw32/bin/ld.exe: E:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/12.1.0/../../../../lib\libSDL2.a(SDL_winmm.c.obj):(.text+0x3f2): undefined reference to `__imp_waveOutGetErrorTextW'
E:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/12.1.0/../../../../x86_64-w64-mingw32/bin/ld.exe: E:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/12.1.0/../../../../lib\libSDL2.a(SDL_winmm.c.obj):(.text+0x588): undefined reference to `__imp_waveInOpen'
E:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/12.1.0/../../../../x86_64-w64-mingw32/bin/ld.exe: E:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/12.1.0/../../../../lib\libSDL2.a(SDL_winmm.c.obj):(.text+0x623): undefined reference to `__imp_waveOutOpen'
E:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/12.1.0/../../../../x86_64-w64-mingw32/bin/ld.exe: E:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/12.1.0/../../../../lib\libSDL2.a(SDL_winmm.c.obj):(.text+0x734): undefined reference to `__imp_waveInPrepareHeader'
E:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/12.1.0/../../../../x86_64-w64-mingw32/bin/ld.exe: E:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/12.1.0/../../../../lib\libSDL2.a(SDL_winmm.c.obj):(.text+0x757): undefined reference to `__imp_waveInAddBuffer'
E:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/12.1.0/../../../../x86_64-w64-mingw32/bin/ld.exe: E:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/12.1.0/../../../../lib\libSDL2.a(SDL_winmm.c.obj):(.text+0x7ab): undefined reference to `__imp_waveOutPrepareHeader'
E:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/12.1.0/../../../../x86_64-w64-mingw32/bin/ld.exe: E:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/12.1.0/../../../../lib\libSDL2.a(SDL_winmm.c.obj):(.text+0x7dd): undefined reference to `__imp_waveInStart'
E:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/12.1.0/../../../../x86_64-w64-mingw32/bin/ld.exe: E:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/12.1.0/../../../../lib\libSDL2.a(SDL_winmm.c.obj):(.text+0x895): undefined reference to `__imp_waveInGetNumDevs'
E:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/12.1.0/../../../../x86_64-w64-mingw32/bin/ld.exe: E:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/12.1.0/../../../../lib\libSDL2.a(SDL_winmm.c.obj):(.text+0x8bb): undefined reference to `__imp_waveInGetDevCapsW'
E:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/12.1.0/../../../../x86_64-w64-mingw32/bin/ld.exe: E:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/12.1.0/../../../../lib\libSDL2.a(SDL_winmm.c.obj):(.text+0x942): undefined reference to `__imp_waveOutGetNumDevs'
E:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/12.1.0/../../../../x86_64-w64-mingw32/bin/ld.exe: E:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/12.1.0/../../../../lib\libSDL2.a(SDL_winmm.c.obj):(.text+0x95f): undefined reference to `__imp_waveOutGetDevCapsW'
E:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/12.1.0/../../../../x86_64-w64-mingw32/bin/ld.exe: E:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/12.1.0/../../../../lib\libSDL2.a(SDL_winmm.c.obj):(.text+0xa4d): undefined reference to `__imp_waveInAddBuffer'
E:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/12.1.0/../../../../x86_64-w64-mingw32/bin/ld.exe: E:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/12.1.0/../../../../lib\libSDL2.a(SDL_wasapi.c.obj):(.text+0x18a): undefined reference to `__imp_CoTaskMemFree'
E:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/12.1.0/../../../../x86_64-w64-mingw32/bin/ld.exe: E:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/12.1.0/../../../../lib\libSDL2.a(SDL_wasapi_win32.c.obj):(.text+0x17e): undefined reference to `__imp_PropVariantClear'
E:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/12.1.0/../../../../x86_64-w64-mingw32/bin/ld.exe: E:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/12.1.0/../../../../lib\libSDL2.a(SDL_wasapi_win32.c.obj):(.text+0x478): undefined reference to `__imp_CoTaskMemFree'
E:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/12.1.0/../../../../x86_64-w64-mingw32/bin/ld.exe: E:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/12.1.0/../../../../lib\libSDL2.a(SDL_wasapi_win32.c.obj):(.text+0x5c3): undefined reference to `__imp_CoCreateInstance'
E:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/12.1.0/../../../../x86_64-w64-mingw32/bin/ld.exe: E:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/12.1.0/../../../../lib\libSDL2.a(SDL_windowsframebuffer.c.obj):(.text+0x33): undefined reference to `__imp_DeleteDC'
E:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/12.1.0/../../../../x86_64-w64-mingw32/bin/ld.exe: E:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/12.1.0/../../../../lib\libSDL2.a(SDL_windowsframebuffer.c.obj):(.text+0x42): undefined reference to `__imp_DeleteObject'
E:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/12.1.0/../../../../x86_64-w64-mingw32/bin/ld.exe: E:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/12.1.0/../../../../lib\libSDL2.a(SDL_windowsframebuffer.c.obj):(.text+0x83): undefined reference to `__imp_CreateCompatibleBitmap'
E:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/12.1.0/../../../../x86_64-w64-mingw32/bin/ld.exe: E:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/12.1.0/../../../../lib\libSDL2.a(SDL_windowsframebuffer.c.obj):(.text+0x9a): undefined reference to `__imp_GetDIBits'
E:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/12.1.0/../../../../x86_64-w64-mingw32/bin/ld.exe: E:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/12.1.0/../../../../lib\libSDL2.a(SDL_windowsframebuffer.c.obj):(.text+0xe2): undefined reference to `__imp_DeleteObject'
E:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/12.1.0/../../../../x86_64-w64-mingw32/bin/ld.exe: E:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/12.1.0/../../../../lib\libSDL2.a(SDL_windowsframebuffer.c.obj):(.text+0x15c): undefined reference to `__imp_CreateCompatibleDC'
E:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/12.1.0/../../../../x86_64-w64-mingw32/bin/ld.exe: E:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/12.1.0/../../../../lib\libSDL2.a(SDL_windowsframebuffer.c.obj):(.text+0x184): undefined reference to `__imp_CreateDIBSection'
E:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/12.1.0/../../../../x86_64-w64-mingw32/bin/ld.exe: E:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/12.1.0/../../../../lib\libSDL2.a(SDL_windowsframebuffer.c.obj):(.text+0x1a7): undefined reference to `__imp_SelectObject'
E:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/12.1.0/../../../../x86_64-w64-mingw32/bin/ld.exe: E:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/12.1.0/../../../../lib\libSDL2.a(SDL_windowsframebuffer.c.obj):(.text+0x28a): undefined reference to `__imp_BitBlt'
E:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/12.1.0/../../../../x86_64-w64-mingw32/bin/ld.exe: E:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/12.1.0/../../../../lib\libSDL2.a(SDL_windowsframebuffer.c.obj):(.text+0x30c): undefined reference to `__imp_DeleteDC'
E:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/12.1.0/../../../../x86_64-w64-mingw32/bin/ld.exe: E:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/12.1.0/../../../../lib\libSDL2.a(SDL_windowsframebuffer.c.obj):(.text+0x323): undefined reference to `__imp_DeleteObject'
E:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/12.1.0/../../../../x86_64-w64-mingw32/bin/ld.exe: E:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/12.1.0/../../../../lib\libSDL2.a(SDL_windowsopengl.c.obj):(.text+0x1a4): undefined reference to `__imp_ChoosePixelFormat'
E:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/12.1.0/../../../../x86_64-w64-mingw32/bin/ld.exe: E:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/12.1.0/../../../../lib\libSDL2.a(SDL_windowsopengl.c.obj):(.text+0x1b2): undefined reference to `__imp_SetPixelFormat'
E:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/12.1.0/../../../../x86_64-w64-mingw32/bin/ld.exe: E:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/12.1.0/../../../../lib\libSDL2.a(SDL_windowsopengl.c.obj):(.text+0x46f): undefined reference to `__imp_DescribePixelFormat'
E:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/12.1.0/../../../../x86_64-w64-mingw32/bin/ld.exe: E:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/12.1.0/../../../../lib\libSDL2.a(SDL_windowsopengl.c.obj):(.text+0x80b): undefined reference to `__imp_SetPixelFormat'
E:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/12.1.0/../../../../x86_64-w64-mingw32/bin/ld.exe: E:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/12.1.0/../../../../lib\libSDL2.a(SDL_windowsopengl.c.obj):(.text+0x981): undefined reference to `__imp_ChoosePixelFormat'
E:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/12.1.0/../../../../x86_64-w64-mingw32/bin/ld.exe: E:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/12.1.0/../../../../lib\libSDL2.a(SDL_windowsopengl.c.obj):(.text+0x98f): undefined reference to `__imp_SetPixelFormat'
E:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/12.1.0/../../../../x86_64-w64-mingw32/bin/ld.exe: E:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/12.1.0/../../../../lib\libSDL2.a(SDL_windowsopengl.c.obj):(.text+0x1741): undefined reference to `__imp_SwapBuffers'
E:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/12.1.0/../../../../x86_64-w64-mingw32/bin/ld.exe: E:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/12.1.0/../../../../lib\libSDL2.a(SDL_windowsopengl.c.obj):(.text+0x17b8): undefined reference to `__imp_GetPixelFormat'
E:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/12.1.0/../../../../x86_64-w64-mingw32/bin/ld.exe: E:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/12.1.0/../../../../lib\libSDL2.a(SDL_windowsopengl.c.obj):(.text+0x17de): undefined reference to `__imp_DescribePixelFormat'
E:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/12.1.0/../../../../x86_64-w64-mingw32/bin/ld.exe: E:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/12.1.0/../../../../lib\libSDL2.a(SDL_windowsopengl.c.obj):(.text+0x17ec): undefined reference to `__imp_SetPixelFormat'
E:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/12.1.0/../../../../x86_64-w64-mingw32/bin/ld.exe: E:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/12.1.0/../../../../lib\libSDL2.a(SDL_dinputjoystick.c.obj):(.text+0xf6a): undefined reference to `__imp_CoCreateInstance'
collect2.exe: error: ld returned 1 exit status
error: C compilation for 'snake_nelua.exe' failed

and A clear and concise description of the bug you are experiencing. Tell what you were trying to do and what happened instead.

Code example

Provide minimal reproduction code to test the bug. Please, format the code properly and try to keep it as simple as possible, just focusing on the experienced bug.

-- Place the Nelua code here.

Expected behavior

A clear and concise description of what you expected to happen.

Workaround

If you have already found a way to workaround the issue, then please share how you did it, this may help others with the same issue.

Environment

Provide relevant information about your environment:

edubart commented 2 years ago

Looks like its because MSYS2 started shipping libSDL2.a as a static library, but the example expected to be linked to a dynamic library. You can try changing linklib 'SDL2' to linklib 'libSDL2.dll.a' in the snakesdl.lua file.

retsyo commented 2 years ago

nice, linklib 'libSDL2.dll.a' fixes the problem. BTW, what if a static link of SDL2 is prefered? Thanks again

edubart commented 2 years ago

what if a static link of SDL2 is prefered?

Then you have to link many others windows libraries that I don't recall which ones now, to fix the undefined reference link errors.