diff --git a/CMakeLists.txt b/CMakeLists.txt
index 559db10cbc44ecf71cd7e03faf19d42f73042c4f..0deb99651914b170d67b2efbdb11e0f2bd3e15c0 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -962,7 +962,7 @@ if(MSVC)
 endif(MSVC)
 
 if(WIN32 OR CYGWIN)
-  list(APPEND EXTERNAL_LIBRARIES wsock32 ws2_32)
+  list(APPEND EXTERNAL_LIBRARIES winmm wsock32 ws2_32)
 endif(WIN32 OR CYGWIN)
 
 # disable compile optimization on some known problematic files
diff --git a/Common/GamePad.cpp b/Common/GamePad.cpp
index 27c3e392fc6b5d875e5be7ffcf7f2f8a6bc20d76..59953698d213f51ff31ad39e4e366937ee25c459 100644
--- a/Common/GamePad.cpp
+++ b/Common/GamePad.cpp
@@ -64,6 +64,8 @@ GamePad::GamePad() : active(false), frequency(.01), gamepad_fd(0) {
 
 #if defined(WIN32)
 
+  return; // FIXME the gamepad code crashes
+
   for (int i = JOYSTICKID1 ; i < JOYSTICKID2 ; i++)  {
     if(JOYERR_NOERROR == joyGetDevCaps(i, &caps, sizeof(JOYCAPS)) ) {
       /*
diff --git a/Mesh/meshPartition.cpp b/Mesh/meshPartition.cpp
index 1b846a31046e5af0771d601b5ccb757456cd84cc..921965d3992b6667b430ee38c0e879c724ea93c6 100644
--- a/Mesh/meshPartition.cpp
+++ b/Mesh/meshPartition.cpp
@@ -31,6 +31,10 @@
 
 //--Prototype for Chaco interface
 
+#ifdef interface
+#undef interface
+#endif
+
 extern "C" int interface
 (int nvtxs, int *start, int *adjacency, int *vwgts, float *ewgts,
  float *x, float *y, float *z,