Since I plan to use SDL3 API, I had to replace GLFW window and surface creation with SDL3 variant. For now it's working fine.
There are many problems with the way the current version is provided and maintained. This commit or series of commits will fix this.