Building Pen from Git on Windows - UlricE/pen GitHub Wiki

(This is for building Pen with Cygwin. To build Pen as a native Windows service, see here: Running Pen as a native Windows service)

Pen was developed on and for Unix-like operating systems. Windows isn't particularly Unix-like, but can be made sufficiently so by the addition of Cygwin.

https://cygwin.com/install.html

Download and run setup-x86_64.exe.

Select autoconf, automake, gcc, make and git.

Accept the resolved dependencies.

Start a Cygwin terminal. After that, the procedure is like on Unix.

mkdir Git
cd Git
git clone https://github.com/UlricE/pen.git
cd pen
aclocal
automake --add-missing
autoconf
./configure
make

Testing reveals a very small default FD_SETSIZE:

ueriksson@LT-BV1RNX1 ~/Git/penloadbalancer-code
$ ./pen -dfU 53 8.8.8.8:53
Number of simultaneous connections to large.
Maximum is 27, or re-build pen with larger FD_SETSIZE

Fortunately this is easily overcome.

./configure --with-fd_setsize=1024
make
./pen -dfU 53 8.8.8.8:53

And in a cmd.exe window:

C:\Users\uericsson>nslookup siag.nu localhost
Server:  UnKnown
Address:  127.0.0.1

Non-authoritative answer:
Name:    siag.nu
Address:  194.9.95.65