【发布时间】:2014-12-21 11:13:52
【问题描述】:
我第一次尝试使用 tesseract,编译时出现以下错误:
lpr.exe 中 0x76F88F05 (ntdll.dll) 处未处理的异常:0xC0150002: Windows 无法处理应用程序绑定信息。 请参阅您的系统事件日志以获取更多信息。
谁能帮帮我?
代码如下:
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);
事件日志消息:
“B:\Projects\Visual 2013\lpr\lpr\libtesseract302d.dll”的激活上下文生成失败。
找不到依赖程序集
Microsoft.VC90.DebugCRT,processorArchitecture="x86",publicKeyToken="1fc8b3b9a1e18e3b",type="win32",version="9.0.21022.8"。请使用 sxstrace.exe 进行详细诊断。
【问题讨论】:
-
不应在标题中添加标签 => meta.stackexchange.com/a/130208/178881
-
运行时出现错误。即使我在我的项目中插入这一行:“tessarct::TessBaseAPI *api= new tesseract::TessBaseAPI();”它仍然给我同样的错误。系统事件日志显示:“B:\Projects\Visual 2013\lpr\lpr\libtesseract302d.dll”的激活上下文生成失败。依赖程序集 Microsoft.VC90.DebugCRT,processorArchitecture="x86",publicKeyToken="1fc8b3b9a1e18e3b",type ="win32",version="9.0.21022.8" 找不到,请使用sxstrace.exe进行详细诊断。"
-
看起来您没有安装 Visual C++ 2008 运行时可分发文件...
-
我安装了它,但它仍然不起作用,也许我需要卸载其他版本?
标签: visual-c++ visual-studio-2013 tesseract unhandled-exception