2

Trying to compile openalpr for OSX, get errors:

[ 62%] Building CXX object misc_utilities/CMakeFiles/openalpr-utils-classifychars.dir/classifychars.cpp.o /Users/dd/Documents/opencv/openalpr/src/misc_utilities/classifychars.cpp:207:31: error: use of undeclared identifier 'ENTER_KEY_ONE' else if (waitkey == ENTER_KEY_ONE || waitkey == ENTER_KEY_TWO) ^ /Users/dd/Documents/opencv/openalpr/src/misc_utilities/classifychars.cpp:207:59: error: use of undeclared identifier 'ENTER_KEY_TWO' else if (waitkey == ENTER_KEY_ONE || waitkey == ENTER_KEY_TWO) ^ /Users/dd/Documents/opencv/openalpr/src/misc_utilities/classifychars.cpp:340:21: error: use of undeclared identifier 'ENTER_KEY_ONE' while (waitkey != ENTER_KEY_ONE && waitkey != ENTER_KEY_TWO && waitkey != ESCAPE_KEY) ^ /Users/dd/Documents/opencv/openalpr/src/misc_utilities/classifychars.cpp:340:49: error: use of undeclared identifier 'ENTER_KEY_TWO' while (waitkey != ENTER_KEY_ONE && waitkey != ENTER_KEY_TWO && waitkey != ESCAPE_KEY) ^ /Users/dd/Documents/opencv/openalpr/src/misc_utilities/classifychars.cpp:367:29: error: use of undeclared identifier 'ENTER_KEY_ONE' waitkey = (int16_t) ENTER_KEY_ONE; ^ /Users/dd/Documents/opencv/openalpr/src/misc_utilities/classifychars.cpp:380:18: error: use of undeclared identifier 'ENTER_KEY_ONE' if (waitkey == ENTER_KEY_ONE || waitkey == ENTER_KEY_TWO) ^ /Users/dd/Documents/opencv/openalpr/src/misc_utilities/classifychars.cpp:380:46: error: use of undeclared identifier 'ENTER_KEY_TWO' if (waitkey == ENTER_KEY_ONE || waitkey == ENTER_KEY_TWO)

7 errors generated. make[2]: * [misc_utilities/CMakeFiles/openalpr-utils-classifychars.dir/classifychars.cpp.o] Error 1 make[1]: * [misc_utilities/CMakeFiles/openalpr-utils-classifychars.dir/all] Error 2 make: *** [all] Error 2

On 10.10.5. Used brew for successful openalpr install: homebrew/science/openalpr: stable 2.2.0 (bottled), HEAD

any suggestions?

ssuperczynski
  • 3,190
  • 3
  • 44
  • 61
ddintzner
  • 245
  • 2
  • 10

1 Answers1

2

Ok, i am able to successfully compile after an edit to 'classifychars.cpp'. Seems to be executing ok, so here is what i did someone else runs into the same issue.

Below is the original block of code starting at line 40:

#ifdef __APPLE__
const int LEFT_ARROW_KEY = 2;
const int RIGHT_ARROW_KEY = 3;

const int DOWN_ARROW_KEY = 1;
const int UP_ARROW_KEY= 0;

#elif WIN32
const int LEFT_ARROW_KEY = 2424832;
const int RIGHT_ARROW_KEY = 2555904;

const int DOWN_ARROW_KEY = 2621440;
const int UP_ARROW_KEY = 2490368;

const int ENTER_KEY_ONE = 13;
const int ENTER_KEY_TWO = 10;

Added the 2 'undeclared identifiers' in the OSX section:

#ifdef __APPLE__
const int LEFT_ARROW_KEY = 2;
const int RIGHT_ARROW_KEY = 3;

const int DOWN_ARROW_KEY = 1;
const int UP_ARROW_KEY= 0;

const int ENTER_KEY_ONE = 13;
const int ENTER_KEY_TWO = 10;

#elif WIN32
const int LEFT_ARROW_KEY = 2424832;
const int RIGHT_ARROW_KEY = 2555904;

const int DOWN_ARROW_KEY = 2621440;
const int UP_ARROW_KEY = 2490368;

const int ENTER_KEY_ONE = 13;
const int ENTER_KEY_TWO = 10;
ddintzner
  • 245
  • 2
  • 10