diff --git a/libraries/vlfeat/CMakeLists.txt b/libraries/vlfeat/CMakeLists.txt
index d248bcf..24469c9 100644
--- a/libraries/vlfeat/CMakeLists.txt
+++ b/libraries/vlfeat/CMakeLists.txt
@@ -16,11 +16,11 @@ set(vl_sources
 set_source_files_properties(${vl_sources} PROPERTIES LANGUAGE C)
 
 if (MSVC)
-  add_definitions(-DVL_BUILD_DLL)
+  #add_definitions(-DVL_BUILD_DLL)
   add_definitions(-DVL_DISABLE_SSE2)
 endif (MSVC)
 
-add_library(vlfeat SHARED ${vl_sources})
+add_library(vlfeat ${vl_sources})
 install(TARGETS vlfeat
   EXPORT  TheiaExport
   RUNTIME DESTINATION bin
diff --git a/libraries/vlfeat/vl/host.h b/libraries/vlfeat/vl/host.h
index 4fdb86c..01c1134 100644
--- a/libraries/vlfeat/vl/host.h
+++ b/libraries/vlfeat/vl/host.h
@@ -316,18 +316,24 @@ defined(__DOXYGEN__)
 #  define snprintf _snprintf
 #  define isnan _isnan
 #endif
-#  ifdef VL_BUILD_DLL
+#  if defined(VL_BUILD_DLL)
 #    ifdef __cplusplus
 #      define VL_EXPORT extern "C" __declspec(dllexport)
 #    else
 #      define VL_EXPORT extern __declspec(dllexport)
 #    endif
-#  else
+#  elif defined(VL_DLL)
 #    ifdef __cplusplus
 #      define VL_EXPORT extern "C" __declspec(dllimport)
 #    else
 #      define VL_EXPORT extern __declspec(dllimport)
 #    endif
+#  else
+#    ifdef __cplusplus
+#      define VL_EXPORT extern "C"
+#    else
+#      define VL_EXPORT extern
+#    endif
 #  endif
 #endif
 
