Has anyone had Tesseract configured the C ++ source code? It has 32 stars, but I'm stuck to even run it like this
While I try to install the source code Tesseractin my visual studio, it gives errors in obj files, how can I edit these files, and this makes no sense to me. If I do not, then what I need to do to successfully run it in my environment (I have the same specifications that github requires )
1.Error LNK2019 unresolved external symbol _l_dnaDiffAdjValues referenced by the _ptraConcatenatePdfToData pdfio2.obj function
2.Error LNK2019 unresolved external symbol _l_dnaJoin referenced by the _recogAppend recogbasic.obj function
3.Error LNK1120 2 unresolved external tesseract.exe
I create it with the following settings:
1. Loaded from Link .
2. Loaded with Tesseract and leptonica .
3.It contains build_tesseract.bat to create the latest version of tesseract.
4. I chose tesseract as the project start
here is my main .cpp file
#include "baseapi.h";
#include "allheaders.h";
int main()
{
char *outText;
tesseract::TessBaseAPI *api = new tesseract::TessBaseAPI();
if (api->Init(NULL, "eng")) {
fprintf(stderr, "Could not initialize tesseract.\n");
exit(1);
}
Pix *image = pixRead("/usr/src/tesseract/testing/phototest.tif");
api->SetImage(image);
outText = api->GetUTF8Text();
printf("OCR output:\n%s", outText);
api->End();
delete[] outText;
pixDestroy(&image);
return 0;
}
source
share