openalpr / imageclipper

Based on https://code.google.com/p/imageclipper/ with enhancements
MIT License
10 stars 7 forks source link

Compile error in Ubuntu 14.04 #7

Open leonardlan opened 6 years ago

leonardlan commented 6 years ago

I get this error when trying to compile. I've linked OpenCV_DIR and libboost_system and libboost_filesystem correctly.

leonard:~/dev/sandbox/imageclipper$

 make
[ 50%] Building CXX object CMakeFiles/imageclipper.dir/src/imageclipper.cpp.o
In file included from /home/leonard/dev/sandbox/imageclipper/src/opencvx/cvdrawrectangle.h:33:0,
                 from /home/leonard/dev/sandbox/imageclipper/src/imageclipper.cpp:49:
/home/leonard/dev/sandbox/imageclipper/src/opencvx/cvcreateaffine.h: In function ‘void cvCreateAffine(CvMat*, CvRect32f, CvPoint2D32f)’:
/home/leonard/dev/sandbox/imageclipper/src/opencvx/cvcreateaffine.h:62:5: error: ‘__BEGIN__’ was not declared in this scope
     __BEGIN__;
     ^
/home/leonard/dev/sandbox/imageclipper/src/opencvx/cvcreateaffine.h:96:5: error: ‘__END__’ was not declared in this scope
     __END__;
     ^
In file included from /usr/local/include/opencv/cv.h:63:0,
                 from /home/leonard/dev/sandbox/imageclipper/src/imageclipper.cpp:34:
/home/leonard/dev/sandbox/imageclipper/src/opencvx/cvcreateaffine.h:63:5: error: label ‘exit’ used but not defined
     CV_ASSERT( rect.width > 0 && rect.height > 0 );
     ^
In file included from /home/leonard/dev/sandbox/imageclipper/src/imageclipper.cpp:49:0:
/home/leonard/dev/sandbox/imageclipper/src/opencvx/cvdrawrectangle.h: In function ‘void cvDrawRectangle(IplImage*, CvRect32f, CvPoint2D32f, CvScalar, int, int, int)’:
/home/leonard/dev/sandbox/imageclipper/src/opencvx/cvdrawrectangle.h:84:5: error: ‘__BEGIN__’ was not declared in this scope
     __BEGIN__;
     ^
/home/leonard/dev/sandbox/imageclipper/src/opencvx/cvdrawrectangle.h:177:5: error: ‘__END__’ was not declared in this scope
     __END__;
     ^
In file included from /usr/local/include/opencv/cv.h:63:0,
                 from /home/leonard/dev/sandbox/imageclipper/src/imageclipper.cpp:34:
/home/leonard/dev/sandbox/imageclipper/src/opencvx/cvdrawrectangle.h:85:5: error: label ‘exit’ used but not defined
     CV_ASSERT( rect.width > 0 && rect.height > 0 );
     ^
In file included from /home/leonard/dev/sandbox/imageclipper/src/imageclipper.cpp:50:0:
/home/leonard/dev/sandbox/imageclipper/src/opencvx/cvcropimageroi.h: In function ‘void cvCropImageROI(const IplImage*, IplImage*, CvRect32f, CvPoint2D32f)’:
/home/leonard/dev/sandbox/imageclipper/src/opencvx/cvcropimageroi.h:64:5: error: ‘__BEGIN__’ was not declared in this scope
     __BEGIN__;
     ^
/home/leonard/dev/sandbox/imageclipper/src/opencvx/cvcropimageroi.h:135:5: error: ‘__END__’ was not declared in this scope
     __END__;
     ^
In file included from /usr/local/include/opencv/cv.h:63:0,
                 from /home/leonard/dev/sandbox/imageclipper/src/imageclipper.cpp:34:
/home/leonard/dev/sandbox/imageclipper/src/opencvx/cvcropimageroi.h:65:5: error: label ‘exit’ used but not defined
     CV_ASSERT( rect.width > 0 && rect.height > 0 );
     ^
make[2]: *** [CMakeFiles/imageclipper.dir/src/imageclipper.cpp.o] Error 1
make[1]: *** [CMakeFiles/imageclipper.dir/all] Error 2
make: *** [all] Error 2
ChocoPath commented 5 years ago

How did you go around this error?

DaemonChoejur commented 3 years ago

Did you fix this error? @leonardlan