kareemu3 / tesseract-ocr

Automatically exported from code.google.com/p/tesseract-ocr
Other
0 stars 0 forks source link

tesseract libraries gives link error when built with x64 Debug mode in VS 2010 for c++ project. (In release mode it is working) #1364

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1.add the tesseract and leptonica related libraries to c++ dll project and 
build for win32 platform
2.link the above compiled 32 bit c++ dll to other x64 platform c# project
3.compile both projects in release mode, it works perfectly in release mode.
  But in debug mode, it gives some linker errors related to Tesseract::TessBaseAPI

What is the expected output? What do you see instead?
The Tessaract API's should work in x64 Debug mode as well similar to x64 
Release 

What version of the product are you using? On what operating system?
Tesseract 3.01, english language

Please provide any additional information below.
Errors List:
error LNK2028: unresolved token (0A00058C) "public: void __cdecl 
tesseract::TessBaseAPI::SetPageSegMode(enum tesseract::PageSegMode)" 
(?SetPageSegMode@TessBaseAPI@tesseract@@$$FQEAAXW4PageSegMode@2@@Z) referenced 
in function "private: void __cdecl 
ImageProcessing::CImageProcessingModule::CallTesseract(void)" 
(?CallTesseract@CImageProcessingModule@ImageProcessing@@$$FAEAAXXZ)

error LNK2028: unresolved token (0A0004CD) "public: void __cdecl 
tesseract::TessBaseAPI::SetPageSegMode(enum tesseract::PageSegMode)" 
(?SetPageSegMode@TessBaseAPI@tesseract@@$$FQEAAXW4PageSegMode@2@@Z) referenced 
in function "private: void __cdecl 
CPostProcessingforMissingLetters::IdentifyUnidentifiedLetter(int &,int &,class 
cv::Mat,class tesseract::TessBaseAPI *,int &,class 
std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> 
> &)" 
(?IdentifyUnidentifiedLetter@CPostProcessingforMissingLetters@@$$FAEAAXAEAH0VMat
@cv@@PEAVTessBaseAPI@tesseract@@0AEAV?$basic_string@DU?$char_traits@D@std@@V?$al
locator@D@2@@std@@@Z)

Original issue reported on code.google.com by nethra.m...@gmail.com on 31 Oct 2014 at 1:22

GoogleCodeExporter commented 9 years ago
See[1]:

   You will need to get 64 bit libraries if you wish to compile your application x64. You cannot mix 32 bit and 64 bit code.

[1] 
https://social.msdn.microsoft.com/Forums/vstudio/en-US/29681626-0491-42d3-a6ab-0
b2b7b3469b1/how-to-use-32bit-library-in-64bit-application

Original comment by zde...@gmail.com on 12 Apr 2015 at 2:56