Visual Studio 2017 中的 Tesseract 3.05 构建错误 [英] Tesseract 3.05 Build errors in Visual Studio 2017

查看:37
本文介绍了Visual Studio 2017 中的 Tesseract 3.05 构建错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用了此处提供的解决方案,以使 Tesseract 3.05 在我的 windows10 x64 项目 Visual Studio 2017 上运行.我在构建时遇到了这些错误:

I used the solution provided here in order to make Tesseract 3.05 work on my windows10 x64 project, visual studio 2017. I got these errors when building it:

    11>c:\users\mestiri\documents\vs2015_tesseract-master\vs2015_tesseract-master\tesseract_3.05\ccutil\unichar.h(164): error C3646: 'UTF32ToUTF8': unknown override specifier
11>c:\users\mestiri\documents\vs2015_tesseract-master\vs2015_tesseract-master\tesseract_3.05\ccutil\unichar.h(164): error C2059: syntax error: 'const'
11>c:\users\jihed mestiri\documents\vs2015_tesseract-master\vs2015_tesseract-master\tesseract_3.05\ccutil\unichar.h(164): error C2238: unexpected token(s) preceding ';'
11>c:\users\jihed mestiri\documents\vs2015_tesseract-master\vs2015_tesseract-master\tesseract_3.05\ccutil\genericvector.h(376): warning C4267: 'argument': conversion from 'size_t' to 'int', possible loss of data
11>c:\users\jihed mestiri\documents\vs2015_tesseract-master\vs2015_tesseract-master\tesseract_3.05\ccutil\params.h(205): warning C4800: 'BOOL8': forcing value to bool 'true' or 'false' (performance warning)
11>c:\users\jihed mestiri\documents\vs2015_tesseract-master\vs2015_tesseract-master\tesseract_3.05\ccutil\unicharset.h(241): error C3646: 'CleanupString': unknown override specifier
11>c:\users\jihed mestiri\documents\vs2015_tesseract-master\vs2015_tesseract-master\tesseract_3.05\ccutil\unicharset.h(241): error C2059: syntax error: 'const'
11>c:\users\jihed mestiri\documents\vs2015_tesseract-master\vs2015_tesseract-master\tesseract_3.05\ccutil\unicharset.h(241): error C2334: unexpected token(s) preceding '{'; skipping apparent function body
11>c:\users\jihed mestiri\documents\vs2015_tesseract-master\vs2015_tesseract-master\tesseract_3.05\ccutil\unicharset.h(244): error C3646: 'CleanupString': unknown override specifier
11>c:\users\jihed mestiri\documents\vs2015_tesseract-master\vs2015_tesseract-master\tesseract_3.05\ccutil\unicharset.h(244): error C2059: syntax error: 'const'
11>c:\users\jihed mestiri\documents\vs2015_tesseract-master\vs2015_tesseract-master\tesseract_3.05\ccutil\unicharset.h(244): error C2238: unexpected token(s) preceding ';'
11>c:\users\jihed mestiri\documents\vs2015_tesseract-master\vs2015_tesseract-master\tesseract_3.05\ccutil\unicharset.h(265): error C2065: 'string': undeclared identifier
11>c:\users\mestiri\documents\vs2015_tesseract-master\vs2015_tesseract-master\tesseract_3.05\ccutil\unicharset.h(265): error C2146: syntax error: missing ';' before identifier 'cleaned'
11>c:\users\ mestiri\documents\vs2015_tesseract-master\vs2015_tesseract-master\tesseract_3.05\ccutil\unicharset.h(265): error C2065: 'cleaned': undeclared identifier
11>c:\users\mestiri\documents\vs2015_tesseract-master\vs2015_tesseract-master\tesseract_3.05\ccutil\unicharset.h(265): error C3861: 'CleanupString': identifier not found
11>c:\users\jihed mestiri\documents\vs2015_tesseract-master\vs2015_tesseract-master\tesseract_3.05\ccutil\unicharset.h(266): error C2065: 'cleaned': undeclared identifier
11>c:\users\jihed mestiri\documents\vs2015_tesseract-master\vs2015_tesseract-master\tesseract_3.05\ccutil\tessdatamanager.h(181): error C3646: 'VersionString': unknown override specifier
11>c:\users\jihed mestiri\documents\vs2015_tesseract-master\vs2015_tesseract-master\tesseract_3.05\ccutil\tessdatamanager.h(181): error C2059: syntax error: '('
11>c:\users\jihed mestiri\documents\vs2015_tesseract-master\vs2015_tesseract-master\tesseract_3.05\ccutil\tessdatamanager.h(181): error C2238: unexpected token(s) preceding ';'
11>c:\users\jihed mestiri\documents\vs2015_tesseract-master\vs2015_tesseract-master\tesseract_3.05\ccutil\tessdatamanager.h(183): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
11>c:\users\jihed mestiri\documents\vs2015_tesseract-master\vs2015_tesseract-master\tesseract_3.05\ccutil\tessdatamanager.h(183): error C2143: syntax error: missing ',' before '&'
11>c:\users\jihed mestiri\documents\vs2015_tesseract-master\vs2015_tesseract-master\tesseract_3.05\ccutil\tessdatamanager.h(134): error C2664: 'void tesseract::TessdataManager::SetVersionString(const int)': cannot convert argument 1 from 'const char [13]' to 'const int'
11>c:\users\jihed mestiri\documents\vs2015_tesseract-master\vs2015_tesseract-master\tesseract_3.05\ccutil\tessdatamanager.h(134): note: There is no context in which this conversion is possible
11>c:\users\jihed mestiri\documents\vs2015_tesseract-master\vs2015_tesseract-master\tesseract_3.05\ccutil\tessdatamanager.h(138): error C2664: 'void tesseract::TessdataManager::SetVersionString(const int)': cannot convert argument 1 from 'const char [13]' to 'const int'
11>c:\users\jihed mestiri\documents\vs2015_tesseract-master\vs2015_tesseract-master\tesseract_3.05\ccutil\tessdatamanager.h(138): note: There is no context in which this conversion is possible
11>c:\users\jihed mestiri\documents\vs2015_tesseract-master\vs2015_tesseract-master\tesseract_3.05\dict\dict.h(55): warning C4566: character represented by universal-character-name '\u2606' cannot be represented in the current code page (1252)
11>c:\users\jihed mestiri\documents\vs2015_tesseract-master\vs2015_tesseract-master\tesseract_3.05\api\tesseractmain.cpp(34): fatal error C1083: Cannot open include file: 'simddetect.h': No such file or directory
11>Done building project "tesseract.vcxproj" -- FAILED.
========== Build: 9 succeeded, 2 failed, 0 up-to-date, 0 skipped ==========

如何解决?

推荐答案

自链接答案发布以来,项目结构发生了变化.它已更新到 Tesseract 3.05 并清除 Git 子模块链接到适当的 Leptonicatesseract_3.05 源.

Since the time of the linked answer, project structure was changed. It's updated to Tesseract 3.05 and clear Git submodule links to the proper Leptonica and tesseract_3.05 sources added.

您似乎已经为他们下载了主源.目前 VS2015_Tesseract 与其不兼容.

It looks like you've downloaded master sources for both of them. At the moment VS2015_Tesseract is not compatible with it.

正确的依赖链接是:leptonica @ e98a794tesseract_3.05 @ 7fe95f0.下载并尝试重建解决方案.

Proper dependency links are: leptonica @ e98a794 and tesseract_3.05 @ 7fe95f0. Download it and try to rebuild the solution.

这篇关于Visual Studio 2017 中的 Tesseract 3.05 构建错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆