Our document scanning/document management app makes use of the tesseract 
library. We have a single .cpp the contains "glue" code to do things like 
clip areas of an image and adjust image depth and resolution before 
handling it off to SetImage and SetRectangle in tesseract.  In version 3.05 
of tesseract, we did this by generating static versions of the leptonic and 
tesseract libraries and then linking them in a VS project with our glue 
code, creating a DLL that contains the linked glue code, tesseract lib, and 
leptonica lib with the tessdata folder in a zip file as a resource which is 
unpacked/unzipped at initialization.  This has worked like a champ from 
version 2.x through 3.05.  I'm now using VS 2022 on Windows 10 x64 and I've 
created the latest leptonica (1.83.1) and tesseract (5.3.1) as static 
libraries, but when I try and link with our glue code, I get a lot (908 to 
be exact) of LNK2005 and other weird errors.  The glue code is C++ and we 
are including tesseract's baseapi.h and a few other header files.  Has 
anyone else tried to do this on Windows 10 x64 and VS 2022? My Windows guru 
thinks it stems from including baseapi.h in both the glue code and the 
tesseract lib. Is there some obscure flag I can set in VS 2022 to tell it 
to ignore duplicately defined symbols (i.e. LNK2005)?  FYI, I did this 
successfully on a 64-bit Mac M1machine with no problem, so I suspect it is 
simply my ignorance of the VS 2022 options that is my issue on Windows.

-- 
You received this message because you are subscribed to the Google Groups 
"tesseract-ocr" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to tesseract-ocr+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tesseract-ocr/bf30d143-557c-4d3f-ab9a-22e4396fde2cn%40googlegroups.com.

Reply via email to