diff --git a/mex/sources/k_order_perturbation/dynamic_dll.cpp b/mex/sources/k_order_perturbation/dynamic_dll.cpp index 3e1f75fb2..4ee119dab 100644 --- a/mex/sources/k_order_perturbation/dynamic_dll.cpp +++ b/mex/sources/k_order_perturbation/dynamic_dll.cpp @@ -75,7 +75,7 @@ DynamicModelDLL::DynamicModelDLL(const string &modName, const int y_length, cons DynamicModelDLL::~DynamicModelDLL() { -#ifdef _WIN32 +#if !defined(__CYGWIN32__) && !defined(_WIN32) FreeLibrary(dynamicHinstance); #else dlclose(dynamicHinstance);