title: tesseract 3.01 actual_tessdata_num_entries_ <= TESSDATA_NUM_ENTRIES
body: <p>I'm building tesseract 3.01 and magick++ into a program because the command line versions were too slow. getting everything compiled correctly took forever but finally I get no errors in my compiler, but as soon as I go to run my console app I get </p>
  
  <pre><code>PS C:\Users\sirus\Documents\Visual Studio 2013\Projects\ConsoleApplication4\Release&gt; .\ConsoleApplication4.exe
  first command
  actual_tessdata_num_entries_ &lt;= TESSDATA_NUM_ENTRIES:Error:Assert failed:in file ..\ccutil\tessdatamanager.cpp, line 48
  PS C:\Users\sirus\Documents\Visual Studio 2013\Projects\ConsoleApplication4\Release&gt; l
  </code></pre>
  
  <p>searching for this online shows that this is what happens when you have to incorrect language data, but I have tesseract 3.01 and the tesseract 3.01 language data downloaded directly from their google code site.</p>
  
  <p>I'm using visual studio 2013 on windows 8.1 building 32 bit /MD</p>
  
  <p>here is a sample of my source</p>
  
  <pre><code>#include &lt;stdio.h&gt;
  #include &lt;string&gt;
  #include &lt;iostream&gt;               
  #include &lt;iomanip&gt;
  #include &lt;locale&gt;
  #include &lt;sstream&gt;
  #include &lt;string&gt; 
  #include &lt;Magick++.h&gt;
  #include "baseapi.h"
  #include "allheaders.h"
  using namespace Magick;
  using namespace std;
  using namespace tesseract;
  #define MaxRGB ((Magick::Quantum)65545)
  tesseract::TessBaseAPI tess;
  
  
  
  string cmd = "";
  string cmd2 = "";
  
  
  void img_split(){
      string tesseract = "\"C:\\Program Files (x86)\\Tesseract-OCR\\tesseract.exe\" text/";
      int rect_y = 141;
      string del = "del /s /q text\\*";
      system(del.c_str());
      for (int x = 1; x &lt; 40; x++){
          rect_y += 19;
          Image image;
          image.read("source.jpg");
          Magick::Image* mImage;
          Image sub_image(image);
          mImage = &amp;sub_image;
          //mImage-&gt;write("test.jpg");
  
  
          sub_image.chop(Geometry(1481, rect_y));
          sub_image.crop(Geometry(220, 17));
  
          sub_image.quantizeColorSpace(GRAYColorspace);
          sub_image.quantizeColors(2);
          sub_image.quantizeDither(false);
          sub_image.quantize();
          sub_image.scale(Geometry(2200,170));
          sub_image.antiAlias();
          sub_image.compressType(Magick::NoCompression);
  
  
          //const unsigned char* imagedata = (unsigned char*)mImage;
          //tess.SetImage(imagedata, 2200, 170, 1, 17300);
          //tess.Recognize(0);
          //const char* out = tess.GetUTF8Text();
          //cout &lt;&lt; "\n\nno idea if this will work: " &lt;&lt; out &lt;&lt; endl;
  
  
          sub_image.write("text/" + static_cast&lt;ostringstream*&gt;(&amp;(ostringstream() &lt;&lt; x))-&gt;str() + ".gif");
          //cmd2 = tesseract + static_cast&lt;ostringstream*&gt;(&amp;(ostringstream() &lt;&lt; x))-&gt;str() + ".png text/" + static_cast&lt;ostringstream*&gt;(&amp;(ostringstream() &lt;&lt; x))-&gt;str();
          //tesseract_ocr(x);
      }
  
  }
  
  int main(int argc, char **argv)
  {
      cout &lt;&lt; "first command\n";
      //tess.Init(argv[0], "eng", tesseract::OEM_DEFAULT);
      tess.Init(*argv, "eng");
      tess.SetPageSegMode(tesseract::PSM_AUTO);
      cout &lt;&lt; "\ntest" &lt;&lt; endl;
      InitializeMagick(*argv);
      //img_split();
  
      return 0;
  }
  </code></pre>
  
  <p>bonus points if you can tell me how to correctly pass the image in sub_image to tesseract's setimage function (because i'm pretty sure what I have wont be right either)</p>