title: tesseract-ocr how to includ baseapi.h
body: <p>I followed the instructions I found in form of tessesract on how to includ baseapi.h.</p>
  
  <p>i am using:</p>
  
  <p>vs2010<br>
  Version tesseract 3.01 </p>
  
  <p>i try to understand how to use baseapi.h.</p>
  
  <p>test program:</p>
  
  <pre><code>#define __MSW32__
  
   #include "baseapi.h"
  
  using namespace  tesseract;
  
  int _tmain(int argc, _TCHAR* argv[])
  
  {
  
     TessBaseAPI *myTestApi;
  
     myTestApi=new TessBaseAPI();
  
     //myTestApi-&gt;Init("d:/temp.jpg","eng");
  
     return 0;
  
  }
  </code></pre>
  
  <p>form gide:</p>
  
  <p>add the following folders to Additional Include Directories (properties) - to resolve file not found issues after including "baseapi.h" </p>
  
  <p>tesseract-3.01/api</p>
  
  <p>tesseract-3.01/ccmain</p>
  
  <p>tesseract-3.01/ccutil</p>
  
  <p>tesseract-3.01/ccstruct
  <img src="https://i.stack.imgur.com/YphmX.png" alt="enter image description here"></p>
  
  <p>added the following libs to "Properties/Linker/Input/Additional Dependancies" in order to use the Tesseract and Leptonica libs libtesseract.lib;liblept.lib</p>
  
  <p><img src="https://i.stack.imgur.com/OHZ3Y.png" alt="enter image description here">
  // added the following paths to "Properties/Linker/General/Additional Library Directories" in order to find the Tesseract and Leptonica libs 
  tesseract-3.01/vs2010/Release
  tesseract-3.01/vs2008/lib</p>
  
  <p><img src="https://i.stack.imgur.com/XGPex.png" alt="enter image description here"></p>
  
  <p>And I try to run now</p>
  
  <p><img src="https://i.stack.imgur.com/MmfUc.png" alt="enter image description here"></p>
  
  <p>So I try to find libs libtesseract.lib and  replaced with libtesseract_tessopt.lib and then run
  <img src="https://i.stack.imgur.com/T1jTJ.png" alt="enter image description here"></p>
  
  <pre><code>1&gt;------ Build started: Project: test4, Configuration: Debug Win32 ------
  1&gt;  test4.cpp
  1&gt;test4.obj : error LNK2019: unresolved external symbol "public: __thiscall tesseract::TessBaseAPI::TessBaseAPI(void)" (??0TessBaseAPI@tesseract@@QAE@XZ) referenced in function _wmain
  1&gt;c:\users\eran0708\documents\visual studio 2010\Projects\test4\Debug\test4.exe : fatal error LNK1120: 1 unresolved externals
  ========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========
  </code></pre>
  
  <p>Is anything known solution to the problem?</p>
  
  <p>thanks,</p>
  
  <p>eran </p>
  
  <p>![enter image description here][6]</p>
  
  <p>![enter image description here][7]</p>