在 x64 位機器上的 Visual Studio 2013 中鏈接 tesseract 和 opencv (Linking tesseract and opencv in Visual Studio 2013 on x64 bit machine)


問題描述

在 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. 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 :‑)


參考解法

方法 1:

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.

(by Alae BenchekrounDan Mašek)

參考文件

  1. Linking tesseract and opencv in Visual Studio 2013 on x64 bit machine (CC BY‑SA 2.5/3.0/4.0)

#tesseract #visual-studio #OpenCV






相關問題

Android Studio 如何修復無法創建類文件錯誤? (Android Studio How to fix cannot create class-file error?)

Python - 程序收到信號 SIGSEGV,分段錯誤 (Python - Program received signal SIGSEGV, Segmentation fault)

Tesseract OCR 在線程中使用時崩潰 (Tesseract OCR crash when used in thread)

如何將 Leptonica Pix 對象轉換為 Android 的位圖 (How to convert Leptonica Pix Object to Android's Bitmap)

錯誤 2 在 pytesseract 中沒有這樣的文件或目錄 (Error 2 No such file or directory in pytesseract)

OCR:沒有得到想要的結果 (OCR : Not getting desired result)

在 x64 位機器上的 Visual Studio 2013 中鏈接 tesseract 和 opencv (Linking tesseract and opencv in Visual Studio 2013 on x64 bit machine)

如何提高讀取正方體的準確性? (How to improve read tesseract accuracy?)

如何將 C++ tesseract-ocr 代碼轉換為 Python? (how to convert C++ tesseract-ocr code to Python?)

Tesseract Worker.Load 掛在 Vercel 上 (Tesseract Worker.Load hangs on Vercel)

如何在窗口上使用 MinGW 編譯 tesseract baseapi.h? (How to compile tesseract baseapi.h with MinGW on window?)

Pytesseract 或 Keras OCR 從圖像中提取文本 (Pytesseract or Keras OCR to extract text from image)







留言討論