Alae Benchekroun
Alae Benchekroun

Reputation: 45

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. 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.

Here are some errors screenshots :

Tesseract Errors :

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

Opencv Errors :

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 :-)

Upvotes: 0

Views: 300

Answers (1)

Dan Mašek
Dan Mašek

Reputation: 19041

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. That will not work -- you either need all 64bit libraries for a 64bit application, or all 32bit libraries for a 32bit application.

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. The older versions still had them.

Another option is to download this nuget package along with the associated redistributables package. Since the files are just ZIP files with a different extension, it is possible to extract all the headers, import libraries and DLLs manually.

Upvotes: 0

Related Questions