tesseract: mingw64-cmake build error
command: mkdir build && cd build && mingw64-cmake … && make system:Linux localhost.localdomain 4.16.7-200.fc27.x86_64 Fedora release 27 (Twenty Seven)
distribution
CMakeFiles/tesseract.dir/objects.a(tesseractmain.cpp.obj):tesseractmain.cpp:(.text+0x13a2): undefined reference to TIFFSetWarningHandler' CMakeFiles/tesseract.dir/objects.a(tesseractmain.cpp.obj):tesseractmain.cpp:(.text+0x1478): undefined reference to tesseract::Dict::GlobalDawgCache()’
collect2: error: ld returned 1 exit status
make[2]: *** [CMakeFiles/tesseract.dir/build.make:88: bin/tesseract.exe] Error 1
make[1]: *** [CMakeFiles/Makefile2:68: CMakeFiles/tesseract.dir/all] Error 2
make: *** [Makefile:130: all] Error 2
About this issue
- Original URL
- State: closed
- Created 6 years ago
- Comments: 19 (13 by maintainers)
Yep, I catch this bug. Qt 5.12 + mingw73_64 The problem is - you are trying to call tesseract::Dict::GlobalDawgCache() which is not exported from dll. I’m realy messed, why even MSVC didn’t catch this bug, maybe due to it is a static function and somehow linker could get the definition, also I don’t remember that this bug was appearing a year ago even with MinGW. So, just add
TESS_APIto theDict:src\dict\dict.hProbably other objects may need to be checked for missing TESTS_API.