Visual c++ 运行Tesseract OCR时未处理的异常

Visual c++ 运行Tesseract OCR时未处理的异常,visual-c++,visual-studio-2013,tesseract,unhandled-exception,Visual C++,Visual Studio 2013,Tesseract,Unhandled Exception,我第一次尝试使用tesseract,编译时出现以下错误: Unhandled exception at 0x76F88F05 (ntdll.dll) in lpr.exe: 0xC0150002: Windows was not able to process the application binding information. Please refer to your System Event Log for further information. 事件日志消息: “B:\Proje

我第一次尝试使用tesseract,编译时出现以下错误:

Unhandled exception at 0x76F88F05 (ntdll.dll) in lpr.exe: 0xC0150002: Windows was not able to process the application binding information. Please refer to your System Event Log for further information. 事件日志消息:

“B:\Projects\Visual 2013\lpr\lpr\libtesseract302d.dll”的激活上下文生成失败

依赖程序集
Microsoft.VC90.DebugCRT,processorArchitecture=“x86”,publicKeyToken=“1fc8b3b9a1e1‌​找不到8e3b”,type=“win32”,version=“9.0.21022.8”

请使用sxstrace.exe进行详细诊断


谢谢Colin Robertson

这为我做到了:vorba.ch/2014/tesseract-3.03-vs2013.html–

按照这些步骤操作后,将从tesseract google下载的lib文件包含到您的项目中。

不应在标题中添加标记=>我在运行时收到错误。即使我在项目中只插入这一行:“tessarct::TesserBaseApi*api=new tesseract::TesserBaseApi();”它仍然会给我相同的错误。系统事件日志显示:“无法找到“B:\Projects\Visual 2013\lpr\lpr\libtesseract302d.dll”。相关程序集Microsoft.VC90.DebugCRT,processorArchitecture=“x86”,publicKeyToken=“1fc8b3b9a1e18e3b”,type=“win32”,version=“9.0.21022.8”。请使用sxstrace.exe进行详细诊断。”看起来你没有安装VisualC++ 2008运行时分布式表…这是我需要安装的吗?我安装了它,但不,它仍然不工作,也许我需要安装其他版本?
char *outText;

tesseract::TessBaseAPI *api = new tesseract::TessBaseAPI();
// Initialize tesseract-ocr with English, without specifying tessdata path
if (api->Init(NULL, "eng")) {
    fprintf(stderr, "Could not initialize tesseract.\n");
    exit(1);
}

// Open input image with leptonica library
Pix *image = pixRead("B:\Projects\Visual 2013\lpr\lpr\placuta.jpeg");
api->SetImage(image);
// Get OCR result
outText = api->GetUTF8Text();
printf("OCR output:\n%s", outText);

// Destroy used object and release memory
api->End();
delete[] outText;
pixDestroy(&image);