2

I'm trying to use the tesseract in visual studio 2013. I'm using "libtesseract302.lib" in the the linker -> Input (not "libtesseract302-static.lib") and everythings was OK, and it's compiled and run, but when I tried to use this code:

tesseract::ResultIterator* ri;
tesseract::ChoiceIterator ci(*ri);

I got five link errors like this:

Error   3   error LNK2028: unresolved token (0A000567)
"public: __thiscall tesseract::ChoiceIterator::ChoiceIterator
(class tesseract::LTRResultIterator const &)"
(??0ChoiceIterator@tesseract@@$$FQAE@ABVLTRResultIterator@1@@Z)
referenced in function "int __cdecl main(void)" (?main@@$$HYAHXZ)

I think it's because I didn't use the static library, so I tried that, but I got many linking errors. I think that is due to the static library having been built before using vs2008 that I got from here.

Tesseract

So I'm trying now to compile the tesseract as static lib in vs2013. Will solve the issue, or should I try something else?

Teemu Leisti
  • 3,750
  • 2
  • 30
  • 39
Hazem Abdullah
  • 1,837
  • 4
  • 23
  • 41
  • I believe that the name mangling that Visual Studio does changes between versions, hence VS2013 will be looking for a symbol that is slightly different to the one that VS2008 emitted. Have a look here for instructions to compile Tesseract from Visual Studio 2013: http://vorba.ch/2014/tesseract-3.03-vs2013.html – slugonamission Feb 18 '15 at 11:43
  • Also, apparently you also need to link against `liblept168.lib`, source: https://groups.google.com/forum/#!msg/tesseract-ocr/Mqwz6zO0w3E/ry9ywYPzXnsJ – slugonamission Feb 18 '15 at 11:45
  • Yes I already link the liblept168.lib, but not working as well – Hazem Abdullah Feb 18 '15 at 11:48

0 Answers0