0

There is a question same issue here. But the solution is not there. I use windows8, visual studio 2013. My machine is 64bit. I try to integrate tesseract ocr to vs2013. I install leptonica from here and tesseract from here.

I did below steps :

  1. Project solutions -> C++ -> General

    C:\Tesseract-OCR\include
    C:\Tesseract-OCR\include\tesseract
    C:\Tesseract-OCR\include\leptonica
    
  2. Linker-> General -> Additional Library Directories

    C:\Tesseract-OCR\lib

  3. Linker->Input ->Additional Dependencies

    libtesseract302.lib liblept168.lib

  4. Restart vs2013

I try below line in main function `tesseract::TessBaseAPI api;'. When I run these code, I get an error.

Error message :

Error   2   error LNK2001: unresolved external symbol "public: virtual __cdecl tesseract::TessBaseAPI::~TessBaseAPI(void)" (??1TessBaseAPI@tesseract@@UEAA@XZ)
Community
  • 1
  • 1
zakjma
  • 2,030
  • 12
  • 40
  • 81

1 Answers1

0

A few small things I figured out that make sample code compile

1.more include directories are required. My directories don't exactly match OP.

  • C:\Program Files (x86)\Tesseract-OCR\include
  • C:\Program Files (x86)\Tesseract-OCR\include\leptonica
  • all irectories of form C:\Program Files (x86)\Tesseract-OCR\tesseract-ocr[subdirectory]

    1. At top of main file paste the following line

    #define _CRT_SECURE_NO_WARNINGS //prevents a deprecation error from the tesserect API

    1. The required file libtesseract302.lib does not come with the windows installer. You must download and unzip tesseract-3.02.02-win32-lib-include-dirs.zip. Then copy all the files into C:\Program Files (x86)\Tesseract-OCR\lib
  • another small thing C:\Program Files (x86)\Tesseract-OCR\lib has to be added to the path for the program to run after it is compiled – J.P. Denoyer Mar 19 '15 at 15:47