Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Fix linker error for baseapi_test when building without legacy engine
Linker error reported in issue #2439:

    unittest/baseapi_test.cc:190:
      undefined reference to
      `tesseract::TessBaseAPI::AdaptToWordStr(tesseract::PageSegMode, char const*)'

Signed-off-by: Stefan Weil <sw@weilnetz.de>
  • Loading branch information
stweil committed May 16, 2019
1 parent 4b397c7 commit f097b8a
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions unittest/baseapi_test.cc
Expand Up @@ -166,6 +166,10 @@ TEST_F(TesseractTest, RickSnyderNotFuckSnyder) {

// Tests that Tesseract gets exactly the right answer on some page numbers.
TEST_F(TesseractTest, AdaptToWordStrTest) {
#ifdef DISABLED_LEGACY_ENGINE
// Skip test because TessBaseAPI::AdaptToWordStr is missing.
GTEST_SKIP();
#else
static const char* kTrainingPages[] = {
"136.tif", "256.tif", "410.tif", "432.tif", "540.tif",
"692.tif", "779.tif", "793.tif", "808.tif", "815.tif",
Expand Down Expand Up @@ -204,6 +208,7 @@ TEST_F(TesseractTest, AdaptToWordStrTest) {
EXPECT_STREQ(kTestText[i], ocr_text.c_str());
pixDestroy(&src_pix);
}
#endif
}

// Tests that LSTM gets exactly the right answer on phototest.
Expand Down

0 comments on commit f097b8a

Please sign in to comment.