diff --git a/modules/line_descriptor/include/opencv2/line_descriptor/bitops.hpp b/modules/line_descriptor/include/opencv2/line_descriptor/bitops.hpp index 242bdcfca..7eab040ca 100644 --- a/modules/line_descriptor/include/opencv2/line_descriptor/bitops.hpp +++ b/modules/line_descriptor/include/opencv2/line_descriptor/bitops.hpp @@ -43,9 +43,15 @@ #ifndef __OPENCV_BITOPTS_HPP #define __OPENCV_BITOPTS_HPP -#define popcntll __builtin_popcountll -#define popcnt __builtin_popcount +#ifdef __MSC_VER +# include +# define popcnt __popcnt +# define popcntll __popcount64 +#else +# define popcntll __builtin_popcountll +# define popcnt __builtin_popcount +#endif /* LUT */ const int lookup[] =