error: ‘CV_WINDOW_AUTOSIZE’ was not declared in this scope code example

Example: error: ‘CV_WINDOW_AUTOSIZE’ was not declared in this scope

#include <opencv2/highgui/highgui.hpp>

NOTE:
since all the windowing stuff is in the highgui module, you'll need to include above header.

Example error:
prashad@ubuntu:~/test$ g++ create_ipl_image.cpp   `pkg-config opencv cvblob --cflags --libs` 
create_ipl_image.cpp: In function ‘int main()’:
create_ipl_image.cpp:14:31: error: ‘CV_WINDOW_AUTOSIZE’ was not declared in this scope
      cvNamedWindow( "Image2", CV_WINDOW_AUTOSIZE );

Tags:

Misc Example