Skip to content

cmake: fix tesseract detection #2220

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Aug 13, 2019

Conversation

alalek
Copy link
Member

@alalek alalek commented Aug 13, 2019

resolves #1378

tesseract 4.x headers require C++11 (can't be used by OpenCV 3.4 without C++11)

Workaround:

  • (OpenCV 3.4.x) build in C++11 mode: cmake -DENABLE_CXX11=ON ...

Debug:

  • cmake -DOPENCV_DEBUG_TESSERACT_BUILD=1 ...

Error messages:

In file included from /build/precommit_macosx/3.4/opencv_contrib/modules/text/src/ocr_tesseract.cpp:55:
In file included from /usr/local/Cellar/tesseract/4.1.0/include/tesseract/baseapi.h:26:
In file included from /usr/local/Cellar/tesseract/4.1.0/include/tesseract/apitypes.h:23:
/usr/local/Cellar/tesseract/4.1.0/include/tesseract/publictypes.h:33:1: error: unknown type name 'constexpr'
constexpr int kPointsPerInch = 72;
^
/usr/local/Cellar/tesseract/4.1.0/include/tesseract/publictypes.h:33:11: error: expected unqualified-id
constexpr int kPointsPerInch = 72;

opencv=build_warnings_xcode_10_3

tesseract 4.x headers require C++11 (can't be used by OpenCV 3.4 without C++11)
@alalek
Copy link
Member Author

alalek commented Aug 13, 2019

👍

@opencv-pushbot opencv-pushbot merged commit 5959d81 into opencv:3.4 Aug 13, 2019
@alalek alalek mentioned this pull request Aug 13, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants