Skip to content

Commit f097b8a

Browse files
committed
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 <[email protected]>
1 parent 4b397c7 commit f097b8a

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

unittest/baseapi_test.cc

+5
Original file line numberDiff line numberDiff line change
@@ -166,6 +166,10 @@ TEST_F(TesseractTest, RickSnyderNotFuckSnyder) {
166166

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

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

0 commit comments

Comments
 (0)