learnopencv
learnopencv copied to clipboard
I found a compilation error about OCR
@spmallick hi I found this error when COMPILING OCR code on my MAC /opencv/opencv_ex/OCR/ocr_simple.cpp:3:10: fatal error: 'leptonica/allheaders.h' file not found #include <leptonica/allheaders.h> ^~~~~~~~~~~~~~~~~~~~~~~~ 1 error generated. make[2]: *** [CMakeFiles/ocr_simple.dir/ocr_simple.cpp.o] Error 1 make[1]: *** [CMakeFiles/ocr_simple.dir/all] Error 2 make: *** [all] Error 2 So the code here should be:
#ifdef __APPLE__
#include <allheaders.h>
#else
#include <leptonica/allheaders.h>
#endif
and the original code is
#include <leptonica/allheaders.h>
Without trying on my own - as I don't have an APPLE available right now - looks like "APPLE" is not set, is not defined, so going into the "#else" branch.
Can you check whether you have the file "allheaders.h" somewhere in your file-system?