For Msys2/Mingw-w64 build, you can get a build instruction : https://sourceforge.net/p/gnuplot/support-requests/199/