简体   繁体   English

链接tesseract库

[英]Linking tesseract libs

I'm having trouble using tesseract. 我在使用tesseract时遇到问题。 I've downloaded the source code and compiled successfully. 我已经下载了源代码并成功编译。 Then I created a project in VC++ and I'm trying to do the first steps. 然后,我使用VC ++创建了一个项目,然后尝试执行第一步。

I created a simple program and included 我创建了一个简单的程序并包含

#include <baseapi.h>

On project properties -> Linker -> Additional Dependencies i`ve put all the libs that tesseract generated 在项目属性->链接器->其他依赖项上,我放置了tesseract生成的所有库

ccmain.lib ccstruct.lib ccutil.lib classify.lib cube.lib cutil.lib dict.lib image.lib libtesseract_tessopt.lib libtesseract_training.lib neural_networks.lib textord.lib viewer.lib wordrec.lib ccmain.lib ccstruct.lib ccutil.lib classify.lib cube.lib cutil.lib dict.lib image.lib libtesseract_tessopt.lib libtesseract_training.lib Neuro_networks.lib textord.lib viewer.lib wordrec.lib

I also set the path of libs on Additional Libraries Directories. 我还在其他图书馆目录上设置了图书馆的路径。 It seems to recognize the libs. 似乎认识到库。 But the problem is that i`m getting the following error: 但是问题是我收到以下错误:

fatal error C1083: Cannot open include file: 'baseapi.h': No such file or directory

Can anyone help me? 谁能帮我? I`m just starting and it is difficult. 我刚刚开始,很难。

As an update, I've set the paths and included the files on my solution. 作为更新,我设置了路径并将文件包含在解决方案中。 But I'm getting different errors on ccutil.h. 但是我在ccutil.h上遇到了不同的错误。

* fatal error C1083: Cannot open include file: 'pthread.h': No such file or directory * * 致命错误C1083:无法打开包含文件:'pthread.h':没有此类文件或目录*

Due to this code 由于此代码

#ifdef WIN32
#include <windows.h>
#else
#include <pthread.h>
#include <semaphore.h>
#endif

在您的项目上,您需要将路径添加到“其他包含目录”中的tesseract标头。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM