First compilation on Windows

Fixed a few errors and warnings when compiling on Windows.