Failed to find library "leptonica-1.80.0.dll" for platform x86.

1,532 views
Skip to first unread message

harika reddy

unread,
Nov 29, 2021, 10:51:39 AM11/29/21
to tesseract-ocr
Hi , I am using tesseract ocr in windows application. It is working fine when I run the application in visual studio or  using the .exe file in bin folder. But, when I publish the application using click once I am getting the below error.


Exception has been thrown by the target of an invocation.System.DllNotFoundException: Failed to find library "leptonica-1.80.0.dll" for platform x86.
   at InteropDotNet.LibraryLoader.LoadLibrary(String fileName, String platformName)
   at InteropRuntimeImplementer.LeptonicaApiSignaturesInstance.LeptonicaApiSignaturesImplementation..ctor(LibraryLoader loader)

I tried installing x86: vc_redist.x86.exe and  x64: vc_redist.x64.exe, but still getting the same error.

Thank you
Harika

Zdenko Podobny

unread,
Nov 29, 2021, 11:01:20 AM11/29/21
to tesser...@googlegroups.com
So what do you expect from forum users? How we can help you?

As a developer (I assume as you run applications in Visual Studio), you should be able to correctly handle your application dependencies.

Zdenko


po 29. 11. 2021 o 16:51 harika reddy <harikared...@gmail.com> napísal(a):
--
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-oc...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/tesseract-ocr/131341d4-d6e4-40ff-bf0c-426b9a15fd9fn%40googlegroups.com.

harika reddy

unread,
Nov 30, 2021, 10:56:52 AM11/30/21
to tesseract-ocr
HI  Zdenko,

Thanks for your reply.
I'm not facing any issues in adding Tessaract dependencies to my solution and even its working fine with visual studio. 
but, getting the above mentioned error while publishing it. I checked many forum to get solution. but no luck.

So please help me with steps to publish or you can share me the similar blog for the same.

Zdenko Podobny

unread,
Dec 1, 2021, 8:18:51 AM12/1/21
to tesser...@googlegroups.com
Your request is not related to tesseract specifically but Visual studio and Dot.Net.
I am not familiar with Dot.Net and publishing/deploying if it's the final product. Anyway, the error message indicates that your application is not able to find its dependency (leptonica-1.80.0.dll).

So, first of all, you need to learn the dependencies of your application (your message "I tried installing x86: vc_redist.x86.exe..." indicates you have no clue about it).

Next, you need to understand what are system or general dependencies (e.g. usually you can not distribute content of vc_redist.x86.exe or Dot.net - user has to install them by himself) and what are specific dependencies you need to install/package with your app (e.g. leptonica). Location of specific dependencies depends on your OS, used framework, or other tools (tesseract/leptonica wrapper in this case) - you need to find out where they look for external libraries. 

Tools like https://www.dependencywalker.com/ can help you, but I think it would be wise to take some lessons about tools you decided to use and how to produce the final product (application) with them.

Zdenko


ut 30. 11. 2021 o 16:56 harika reddy <harikared...@gmail.com> napísal(a):
Reply all
Reply to author
Forward
0 new messages