CraigLandrum
unread,Aug 18, 2023, 4:55:20 PM8/18/23Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to tesseract-ocr
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.