--- a/mbuild/build_env.py
+++ b/mbuild/build_env.py
@@ -201,17 +201,17 @@
     env['LIBOUT'] = ' ' # nothing when using gar/ar
     env['LINKOUT'] = '-o '
     env['EXEOUT'] = '-o '
-    if env.on_mac() or env.on_windows():
+    if env.on_mac():
         env['DLLOPT'] = '-shared' # '-dynamiclib'
     else:
-        env['DLLOPT'] = '-shared -Wl,-soname,%(SOLIBNAME)s'
+        env['DLLOPT'] = '-shared -Wl,--out-implib,%(SOLIBNAME)s.a'
 
     env['OBJEXT'] = '.o'
     if env.on_windows():
         env['EXEEXT'] = '.exe'
         env['DLLEXT'] = '.dll'
-        env['LIBEXT'] = '.lib'
-        env['PDBEXT'] = '.pdb'
+        env['LIBEXT'] = '.a'
+        env['PDBEXT'] = ''
     elif env.on_mac():
         env['EXEEXT'] = ''
         env['DLLEXT'] = '.dylib'
--- a/mbuild/env.py
+++ b/mbuild/env.py
@@ -1179,6 +1179,8 @@
            @return:  True iff on cygwin"""
         if len(self.env['system']) >= 6 and self.env['system'][0:6] == 'CYGWIN':
             return True
+        if len(self.env['system']) >= 4 and self.env['system'][0:6] == 'MSYS':
+            return True
         return False
 
     def windows_native(self):
--- a/mbuild/base.py
+++ b/mbuild/base.py
@@ -182,6 +182,9 @@
 if _operating_system_name.find('CYGWIN') != -1:
    _on_cygwin = True
    _on_windows = True
+elif _operating_system_name.find('MSYS') != -1:
+   _on_cygwin = True
+   _on_windows = True
 elif  _operating_system_name == 'Microsoft' or  _operating_system_name == 'Windows':
    _on_native_windows = True
    _on_windows = True
