I configured CodeBlocks under MYSYS2 just like on a screenshot:
https://zapodaj.net/images/39af38f140f44.png
After creating EXE file including SFML in Codeblocks under MYSYS2, when I run programme there pops up an error:
"The application was unable to start correctly (0xc000007b).
Click Okay to close the application"
Before in Codeblocks without MYSYS2 everything was OK.
I will add that in Codeblocks programme is working normal. But it doen't run from EXE file.
you are probably missing some dlls. You can use dependency walker to get some idea...
in general msys2 application don't run outside the msys environment...
I change Windows environment path from C:\Program Files (x86)\CodeBlocks\MinGW\bin to C:\msys64\mingw64\bin and everything works fine ;D.