Please read Ian's good advice for building with MSYS and (optionally)
with a 64-bit toolchain. This is the way those of the FLTK team that
build 32-bit and/or 64-bit applications on Windows do it successfully.
That said, I remember that I had the choice to select several options
when downloading and installing the MinGW-W64 (64-bit) gcc compiler
suite. When I selected 'pthread' (or 'posox'?) as opposed to 'win32'
threading all executables depended on libwinpthread-1.dll, no matter how
FLTK was configured. The choice was to download a different MinGW-W64
toolchain. I don't know how you can do this with MSYS2.
To find out which one you have type
$ gcc --version
gcc.exe (x86_64-win32-seh, Built by MinGW-W64 project) 6.1.0
................^^^^^-^^^
The important parts are 'win32' (threads) and 'seh' (exception
handling). If you see something like 'pthread' or 'posix' instead of
'win32' then that's likely the culprit.
What is your output from 'gcc --version'?
As Ian said, we prefer and recommend using MinGW with MSYS (not MSYS2)
and the MinGW-W64 project's toolchain as a separate installation to
build 64-bit executables if you really need it.
One more note: if you want to build native (self-contained,
distributable) Windows executables then you must also
configure/compile/link with
LDFLAGS="-static-libgcc -static-libstdc++'
but that's the next step after you got the right toolchain running.