tesseract: Linker errors while trying to compile Tesseract project

Hi,

I have put my effort by making changes to necessary project files. I have used the solution file present at the following location:

https://github.com/peirick/VS2015_Tesseract/

Unfortunately, that is based on Tesseract - 3.05. I took the latest 4.0 version of source code to build in visual studio. I’m getting following linker errors only for the newly introduced code part in 4.0 i.e., lstm and simddetect:

Severity Code Description Project File Line Suppression State Error LNK1120 8 unresolved externals tesseract D:\tesseract\VS2015_Tesseract\x64\Debug\tesseract.exe 1 Error LNK2001 unresolved external symbol “private: static bool SIMDDetect::avx_available_” (?avx_available_@SIMDDetect@@0_NA) tesseract D:\tesseract\VS2015_Tesseract\tesseract\tesseractmain.obj 1 Error LNK2001 unresolved external symbol “private: static bool SIMDDetect::sse_available_” (?sse_available_@SIMDDetect@@0_NA) tesseract D:\tesseract\VS2015_Tesseract\tesseract\tesseractmain.obj 1 Error LNK2019 unresolved external symbol “public: void __cdecl tesseract::Tesseract::TrainLineRecognizer(class STRING const &,class STRING const &,class BLOCK_LIST *)” (?TrainLineRecognizer@Tesseract@tesseract@@QEAAXAEBVSTRING@@0PEAVBLOCK_LIST@@@Z) referenced in function “public: int __cdecl tesseract::TessBaseAPI::Recognize(class ETEXT_DESC *)” (?Recognize@TessBaseAPI@tesseract@@QEAAHPEAVETEXT_DESC@@@Z) tesseract D:\tesseract\VS2015_Tesseract\tesseract\baseapi.obj 1 Error LNK2019 unresolved external symbol “public: void __cdecl tesseract::Tesseract::LSTMRecognizeWord(class BLOCK const &,class ROW *,class WERD_RES *,class tesseract::PointerVector *)” (?LSTMRecognizeWord@Tesseract@tesseract@@QEAAXAEBVBLOCK@@PEAVROW@@PEAVWERD_RES@@PEAV?$PointerVector@VWERD_RES@@@2@@Z) referenced in function “public: void __cdecl tesseract::Tesseract::classify_word_pass1(struct tesseract::WordData const &,class WERD_RES * *,class tesseract::PointerVector *)” (?classify_word_pass1@Tesseract@tesseract@@QEAAXAEBUWordData@2@PEAPEAVWERD_RES@@PEAV?$PointerVector@VWERD_RES@@@2@@Z) tesseract D:\tesseract\VS2015_Tesseract\tesseract\control.obj 1 Error LNK2019 unresolved external symbol “public: __cdecl tesseract::LSTMRecognizer::LSTMRecognizer(void)” (??0LSTMRecognizer@tesseract@@QEAA@XZ) referenced in function “public: bool __cdecl tesseract::Tesseract::init_tesseract_lang_data(char const *,char const *,char const *,enum tesseract::OcrEngineMode,char * *,int,class GenericVector const *,class GenericVector const *,bool)” (?init_tesseract_lang_data@Tesseract@tesseract@@QEAA_NPEBD00W4OcrEngineMode@2@PEAPEADHPEBV?$GenericVector@VSTRING@@@@3_N@Z) tesseract D:\tesseract\VS2015_Tesseract\tesseract\tessedit.obj 1 Error LNK2019 unresolved external symbol “public: bool __cdecl tesseract::LSTMRecognizer::DeSerialize(bool,class tesseract::TFile *)” (?DeSerialize@LSTMRecognizer@tesseract@@QEAA_N_NPEAVTFile@2@@Z) referenced in function “public: bool __cdecl tesseract::Tesseract::init_tesseract_lang_data(char const *,char const *,char const *,enum tesseract::OcrEngineMode,char * *,int,class GenericVector const *,class GenericVector const *,bool)” (?init_tesseract_lang_data@Tesseract@tesseract@@QEAA_NPEBD00W4OcrEngineMode@2@PEAPEADHPEBV?$GenericVector@VSTRING@@@@3_N@Z) tesseract D:\tesseract\VS2015_Tesseract\tesseract\tessedit.obj 1 Error LNK2019 unresolved external symbol “public: bool __cdecl tesseract::LSTMRecognizer::LoadDictionary(char const *,char const *)” (?LoadDictionary@LSTMRecognizer@tesseract@@QEAA_NPEBD0@Z) referenced in function “public: bool __cdecl tesseract::Tesseract::init_tesseract_lang_data(char const *,char const *,char const *,enum tesseract::OcrEngineMode,char * *,int,class GenericVector const *,class GenericVector const *,bool)” (?init_tesseract_lang_data@Tesseract@tesseract@@QEAA_NPEBD00W4OcrEngineMode@2@PEAPEADHPEBV?$GenericVector@VSTRING@@@@3_N@Z) tesseract D:\tesseract\VS2015_Tesseract\tesseract\tessedit.obj 1 Error LNK2019 unresolved external symbol “public: __cdecl tesseract::LSTMRecognizer::~LSTMRecognizer(void)” (??1LSTMRecognizer@tesseract@@QEAA@XZ) referenced in function “public: void * __cdecl tesseract::LSTMRecognizer::`scalar deleting destructor’(unsigned int)” (??_GLSTMRecognizer@tesseract@@QEAAPEAXI@Z) tesseract D:\tesseract\VS2015_Tesseract\tesseract\tesseractclass.obj 1

Can someone kindly assist me in resolving them?

About this issue

  • Original URL
  • State: closed
  • Created 7 years ago
  • Comments: 23 (5 by maintainers)

Most upvoted comments

thanks a lot, If I run the cmd using administrator, I reslove the problem. when I run cppan , it can download the need files. thanks for your help,