Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

'ptrdiff_t' : is not a member of 'std'

Hi all,

I am trying to build an openCV application in Visual Studio 2010. Have OpenCV 2.4.4. I get the following error during compilation:

1>\OpenCV\2.4\include\opencv2/core/core.hpp(81): error C2039: 'ptrdiff_t' : is not a member of 'std' \r1>\OpenCV\2.4\include\opencv2/core/core.hpp(81): error C2868: 'ptrdiff_t' : illegal syntax for using-declaration; expected qualified-name

Based on a google search, I tried adding to the core.hpp file.

#include "cstddef.h" and separately #include "stddef.h"

Both approaches did not work. Has any one run into similar issues? What is the fix?

Thanks.

Building OpenCV problem : 'ptrdiff_t' : is not a member of 'std'

Hi all,

I am trying to build an openCV application in Visual Studio 2010. Have OpenCV 2.4.4. I get the following error during compilation:

1>\OpenCV\2.4\include\opencv2/core/core.hpp(81):

\\OpenCV\2.4\include\opencv2/core/core.hpp(81): error C2039: 'ptrdiff_t' : is not a member of 'std'
\r1>\OpenCV\2.4\include\opencv2/core/core.hpp(81): \\OpenCV\2.4\include\opencv2/core/core.hpp(81): error C2868: 'ptrdiff_t' : illegal syntax for using-declaration; expected qualified-name

qualified-name;

Based on a google search, I tried adding to the core.hpp file.

\#include "cstddef.h"

#include "cstddef.h" and separately #include "stddef.h" separately

\#include "stddef.h"

Both approaches did not work. Has any one run into similar issues? What is the fix?

Thanks.

click to hide/show revision 3
retagged

updated 2018-12-15 11:15:16 -0600

berak gravatar image

Building OpenCV problem : 'ptrdiff_t' : is not a member of 'std'

Hi all,

I am trying to build an openCV application in Visual Studio 2010. Have OpenCV 2.4.4. I get the following error during compilation:

\\OpenCV\2.4\include\opencv2/core/core.hpp(81): error C2039: 'ptrdiff_t' : is not a member of 'std'
\\OpenCV\2.4\include\opencv2/core/core.hpp(81): error C2868: 'ptrdiff_t' : illegal syntax for using-declaration; expected qualified-name;

Based on a google search, I tried adding to the core.hpp file.

\#include "cstddef.h"

and separately

\#include "stddef.h"

Both approaches did not work. Has any one run into similar issues? What is the fix?

Thanks.