Did you know ... Search Documentation:
Build SWI-Prolog from source

The sources are common for all platforms, but the way to build them is totally different for MS-Windows and all Unix/POSIX based platforms.

Unless you have a serious need to, we generally discourage building the Windows version yourself, due to complexity. We provide nightly builds of Windows binary installers. On the other hand, we generally encourage building yourself on non-windows platforms because binaries tend to be less portable and building is much easier.