--- a/modules/features2d/src/precomp.hpp
+++ b/modules/features2d/src/precomp.hpp
@@ -48,6 +48,7 @@
 
 #include "opencv2/core/utility.hpp"
 #include "opencv2/core/private.hpp"
+#include "opencv2/core/ocl.hpp"
 
 #include <algorithm>