Fix compilation errors.
Some work on getting just basic stuff working with the Windows build.

The Linux/X11 build is broken with this commit.