Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

CAP_PROP_FRAME_WIDTH undeclared in 'How to build applications with OpenCV inside the Microsoft Visual Studio' sample code

I'm following the instructions in How to build applications with OpenCV inside the Microsoft Visual Studio but I'm getting errors from the sample code:

  • error C2065: 'CAP_PROP_FRAME_WIDTH' : undeclared identifier
  • error C2065: 'CAP_PROP_FRAME_HEIGHT' : undeclared identifier
  • error C2065: 'CAP_PROP_FRAME_HEIGHT' : undeclared identifier
  • error C2065: 'CAP_PROP_FRAME_COUNT' : undeclared identifier

I think the identifiers that are undeclared should (are) declared in highgui so why am I not getting them despite the demo code's #include <opencv2/highgui/highgui.hpp>?

Here are the steps I have taken.

  1. I've unpacked the OpenCV (Version 2.4.6) files into C:\OpenCV, run setx -m OPENCV_DIR C:\OpenCV\Build\x64\vc11 from an elevated command prompt and added %OPENCV_DIR%\bin to my path (following instructions in Installation in Windows). Then using the Property pages (View -> Property Pages or Shift-F4) set to 'All Configurations'

  2. I've added $(OPENCV_DIR)\..\..\include to my C/C++ Additional Include Directories

VS12 Property Page Screenshot

  1. I've added $(OPENCV_DIR)\lib to the linker Additional Library Directories

VS12 Property Page Screenshot

  1. I've cut-an-paste the directory listing of the lib files in C:\OpenCV\build\x64\vc11\lib into my input Additional Dependencies

VS12 Property Page Screenshot

  1. I've copied the sample code into a new C++ console app (with ATL). I had to change one line in the template code from int _tmain(int argc, _TCHAR* argv[]) to int _tmain(int argc, char* argv[])

I think the identifiers that are undeclared should (are) declared in highgui so why am I not getting them despite the demo code's #include <opencv2/highgui/highgui.hpp>?

click to hide/show revision 2
removed duplicate error

CAP_PROP_FRAME_WIDTH undeclared in 'How to build applications with OpenCV inside the Microsoft Visual Studio' sample code

I'm following the instructions in How to build applications with OpenCV inside the Microsoft Visual Studio but I'm getting errors from the sample code:

  • error C2065: 'CAP_PROP_FRAME_WIDTH' : undeclared identifier
  • error C2065: 'CAP_PROP_FRAME_HEIGHT' : undeclared identifier
  • error C2065: 'CAP_PROP_FRAME_HEIGHT' : undeclared identifier
  • error C2065: 'CAP_PROP_FRAME_COUNT' : undeclared identifier

I think the identifiers that are undeclared should (are) declared in highgui so why am I not getting them despite the demo code's #include <opencv2/highgui/highgui.hpp>?

Here are the steps I have taken.

  1. I've unpacked the OpenCV (Version 2.4.6) files into C:\OpenCV, run setx -m OPENCV_DIR C:\OpenCV\Build\x64\vc11 from an elevated command prompt and added %OPENCV_DIR%\bin to my path (following instructions in Installation in Windows). Then using the Property pages (View -> Property Pages or Shift-F4) set to 'All Configurations'

  2. I've added $(OPENCV_DIR)\..\..\include to my C/C++ Additional Include Directories

VS12 Property Page Screenshot

  1. I've added $(OPENCV_DIR)\lib to the linker Additional Library Directories

VS12 Property Page Screenshot

  1. I've cut-an-paste the directory listing of the lib files in C:\OpenCV\build\x64\vc11\lib into my input Additional Dependencies

VS12 Property Page Screenshot

  1. I've copied the sample code into a new C++ console app (with ATL). I had to change one line in the template code from int _tmain(int argc, _TCHAR* argv[]) to int _tmain(int argc, char* argv[])

I think the identifiers that are undeclared should (are) declared in highgui so why am I not getting them despite the demo code's #include <opencv2/highgui/highgui.hpp>?

click to hide/show revision 3
adding link to article next to mention of sample code

CAP_PROP_FRAME_WIDTH undeclared in 'How to build applications with OpenCV inside the Microsoft Visual Studio' sample code

I'm following the instructions in How to build applications with OpenCV inside the Microsoft Visual Studio but I'm getting errors from the sample code:

  • error C2065: 'CAP_PROP_FRAME_WIDTH' : undeclared identifier
  • error C2065: 'CAP_PROP_FRAME_HEIGHT' : undeclared identifier
  • error C2065: 'CAP_PROP_FRAME_COUNT' : undeclared identifier

I think the identifiers that are undeclared should (are) declared in highgui so why am I not getting them despite the demo code's #include <opencv2/highgui/highgui.hpp>?

Here are the steps I have taken.

  1. I've unpacked the OpenCV (Version 2.4.6) files into C:\OpenCV, run setx -m OPENCV_DIR C:\OpenCV\Build\x64\vc11 from an elevated command prompt and added %OPENCV_DIR%\bin to my path (following instructions in Installation in Windows). Then using the Property pages (View -> Property Pages or Shift-F4) set to 'All Configurations'

  2. I've added $(OPENCV_DIR)\..\..\include to my C/C++ Additional Include Directories

VS12 Property Page Screenshot

  1. I've added $(OPENCV_DIR)\lib to the linker Additional Library Directories

VS12 Property Page Screenshot

  1. I've cut-an-paste the directory listing of the lib files in C:\OpenCV\build\x64\vc11\lib into my input Additional Dependencies

VS12 Property Page Screenshot

  1. I've copied the sample code from the article into a new C++ console app (with ATL). I had to change one line in the template code from int _tmain(int argc, _TCHAR* argv[]) to int _tmain(int argc, char* argv[])

I think the identifiers that are undeclared should (are) declared in highgui so why am I not getting them despite the demo code's #include <opencv2/highgui/highgui.hpp>?

click to hide/show revision 4
retagged

updated 2013-10-10 04:16:55 -0600

berak gravatar image

CAP_PROP_FRAME_WIDTH undeclared in 'How to build applications with OpenCV inside the Microsoft Visual Studio' sample code

I'm following the instructions in How to build applications with OpenCV inside the Microsoft Visual Studio but I'm getting errors from the sample code:

  • error C2065: 'CAP_PROP_FRAME_WIDTH' : undeclared identifier
  • error C2065: 'CAP_PROP_FRAME_HEIGHT' : undeclared identifier
  • error C2065: 'CAP_PROP_FRAME_COUNT' : undeclared identifier

I think the identifiers that are undeclared should (are) declared in highgui so why am I not getting them despite the demo code's #include <opencv2/highgui/highgui.hpp>?

Here are the steps I have taken.

  1. I've unpacked the OpenCV (Version 2.4.6) files into C:\OpenCV, run setx -m OPENCV_DIR C:\OpenCV\Build\x64\vc11 from an elevated command prompt and added %OPENCV_DIR%\bin to my path (following instructions in Installation in Windows). Then using the Property pages (View -> Property Pages or Shift-F4) set to 'All Configurations'

  2. I've added $(OPENCV_DIR)\..\..\include to my C/C++ Additional Include Directories

VS12 Property Page Screenshot

  1. I've added $(OPENCV_DIR)\lib to the linker Additional Library Directories

VS12 Property Page Screenshot

  1. I've cut-an-paste the directory listing of the lib files in C:\OpenCV\build\x64\vc11\lib into my input Additional Dependencies

VS12 Property Page Screenshot

  1. I've copied the sample code from the article into a new C++ console app (with ATL). I had to change one line in the template code from int _tmain(int argc, _TCHAR* argv[]) to int _tmain(int argc, char* argv[])

I think the identifiers that are undeclared should (are) declared in highgui so why am I not getting them despite the demo code's #include <opencv2/highgui/highgui.hpp>?