简体   繁体   English

在x64位计算机上的Visual Studio 2013中链接tesseract和opencv

[英]Linking tesseract and opencv in Visual Studio 2013 on x64 bit machine

I'm trying to run a program based on tesseract and opencv on Visual Studio 2013 . 我正在尝试在Visual Studio 2013上运行基于tesseractopencv的程序。 I have a x64 bit machine and the problem is when I run it under Win32 I got only opencv linking errors, however under x64 I got tesseract linking errors. 我有一台x64位计算机 ,问题是当我在Win32下运行它时,只有opencv链接错误,但是在x64下,我却出现了tesseract链接错误。

Here are some errors screenshots : 这是一些错误截图:

Tesseract Errors : Tesseract错误:

error LNK2001: unresolved external symbol pixDestroy
error LNK2001: unresolved external symbol pixReadTesseract
error LNK1120: 7 unresolved externals

Opencv Errors : Opencv错误:

error LNK2001: unresolved external symbol _cvLoadImage  
error LNK2001: unresolved external symbol _cvCreateImage    
error LNK2001: unresolved external symbol _cvSaveImage  
error LNK2001: unresolved external symbol _cvReleaseImage   
error LNK1120: 4 unresolved externals

Thank you guys :-) 感谢大伙们 :-)

Your problem appears to be that you have 32bit build of Tesseract and 64bit build of OpenCV, and trying to use them both in the same program. 您的问题似乎是您拥有32位的Tesseract版本和64位的OpenCV版本,并试图在同一程序中同时使用它们。 That will not work -- you either need all 64bit libraries for a 64bit application, or all 32bit libraries for a 32bit application. 那将行不通-对于64位应用程序您需要所有64位库,对于32位应用程序则需要所有32位库。

If you want to stick with OpenCV 3.1 (since the standard distribution package doesn't seem to contain 32bit binaries), then you have to go and build one of the libraries yourself. 如果您要坚持使用OpenCV 3.1(因为标准分发包似乎不包含32位二进制文​​件),则必须自己构建其中一个库。 The older versions still had them. 旧版本仍然有它们。

Another option is to download this nuget package along with the associated redistributables package. 另一个选择是下载此nuget软件包以及相关的可再发行软件包。 Since the files are just ZIP files with a different extension, it is possible to extract all the headers, import libraries and DLLs manually. 由于这些文件只是具有不同扩展名的ZIP文件,因此可以提取所有标头,手动导入库和DLL。

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

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