Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Compilation errror: XY was no declared in this scope

I there,

i was trying to follow this tutorial: http://docs.opencv.org/doc/tutorials/core/how_to_scan_images/how_to_scan_images.html#howtoscanimagesopencv and tried to compile the sample code given here: http://docs.opencv.org/_downloads/how_to_scan_images.cpp and get the following error:

wx@yz:~/Workspace/OpenCV/scan images$ g++ `pkg-config --cflags opencv` how_to_scan_images.cpp `pkg-config --libs opencv` -o test

how_to_scan_images.cpp: In function ‘int main(int, char**)’: how_to_scan_images.cpp:38:29: error: ‘CV_LOAD_IMAGE_GRAYSCALE’ was not declared in this scope how_to_scan_images.cpp:40:29: error: ‘CV_LOAD_IMAGE_COLOR’ was not declared in this scope

I was using the following compilation command

g++ `pkg-config --cflags opencv` how_to_scan_images.cpp `pkg-config --libs opencv` -o test

The Code itself is correct, so why do I still get this error.

Thanks in advance!

Compilation errror: XY was no declared in this scope

I there,

i was trying to follow this tutorial: http://docs.opencv.org/doc/tutorials/core/how_to_scan_images/how_to_scan_images.html#howtoscanimagesopencv and tried to compile the sample code given here: http://docs.opencv.org/_downloads/how_to_scan_images.cpp and get the following error:

wx@yz:~/Workspace/OpenCV/scan images$ g++ `pkg-config --cflags opencv` how_to_scan_images.cpp `pkg-config --libs opencv` -o test

how_to_scan_images.cpp: In function ‘int main(int, char**)’: how_to_scan_images.cpp:38:29: error: ‘CV_LOAD_IMAGE_GRAYSCALE’ was not declared in this scope how_to_scan_images.cpp:40:29: error: ‘CV_LOAD_IMAGE_COLOR’ was not declared in this scope

scope

I was using the following compilation command

g++ `pkg-config --cflags opencv` how_to_scan_images.cpp `pkg-config --libs opencv` -o test

The Code itself is correct, so why do I still get this error.

Thanks in advance!

Compilation errror: XY was no declared in this scope

I there,

i was trying to follow this tutorial: http://docs.opencv.org/doc/tutorials/core/how_to_scan_images/how_to_scan_images.html#howtoscanimagesopencv and tried to compile the sample code given here: http://docs.opencv.org/_downloads/how_to_scan_images.cpp and get the following error:

wx@yz:~/Workspace/OpenCV/scan images$ g++ `pkg-config --cflags opencv` how_to_scan_images.cpp `pkg-config --libs opencv` -o test
how_to_scan_images.cpp: In function ‘int main(int, char**)’:
how_to_scan_images.cpp:38:29: error: ‘CV_LOAD_IMAGE_GRAYSCALE’ was not declared in this scope
how_to_scan_images.cpp:40:29: error: ‘CV_LOAD_IMAGE_COLOR’ was not declared in this scope

I was using the following compilation command

g++ `pkg-config --cflags opencv` how_to_scan_images.cpp `pkg-config --libs opencv` -o test

The Code itself is correct, so why do I still get this error.error. Edit: I'm using Debian Linux and OpenCV 3.

Thanks in advance!