tesseract-samples
tesseract-samples copied to clipboard
Failed to find library "liblept172.dll" for platform x86.
Hello Guy,
Please help me resolve this problem: Failed to find library "liblept172.dll" for platform x86. I have downloaded this sample, but when i extract and open solution and run. It is raised an error
Thanks,
linh tong

Try changing the "Copy to Output Directory" setting for the x86/x64 libs to "Copy always/if newer", then it will work.
Has this error been fixed? I too have the same issue and changing "Copy to Output Directory" in VS2015 does not work. Please let me know the solution. Thanks in advance
It still gives same error .. I have tried almost everything
I was able to fix it by changing the platform target from any to x86 under project build.

I think it is more complicated than just this. When I messed with this problem I tried almost everything that includes this but in the end, I solved it with changing tesseract version.
Note this all changed in the latest release (3.3) and the copying of the unmanaged DLLs is now handled by ms uild script. Note I'd recommend doing a full uninstall and reinstall of the package rather than just an update if you're having issues upgrading.
If this isn't working for you can still set it up manually all that's needed is to ensure that the unmanaged dlls, liblept1753.dll and libtesseract3052.dll for 3.3 release of the wrapper, are copyed to x86 or x64 subdirectory in the output directory i.e:
- MyApp.exe
- x86 ** liblept1753.dll ** libtesseract3052.dll
- x64 ** liblept1753.dll ** libtesseract3052.dll
You can either grab the DLLs from where the tesseract NuGet package is extracted or just download them from https://github.com/charlesw/tesseract/tree/master/src/Tesseract
If you don't have an executable, for instance your building a web app you
can tell the wrapper where to look by setting
TesseractEnviornment.CustomSearchPath
during app startup.
Hope this helps.
On Sat., 29 Dec. 2018, 03:29 tornadots <[email protected] wrote:
I think it is more complicated than just this. When I messed with this problem I tried almost everything that includes this but in the end, I solved it with changing tesseract version.
— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/charlesw/tesseract-samples/issues/1#issuecomment-450386921, or mute the thread https://github.com/notifications/unsubscribe-auth/AAPzyJDmKNgapyfzqOtTd1S85a4w3crOks5u9kbxgaJpZM4IviBg .
Hi
I am getting the following error :
System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.DllNotFoundException: Failed to find library "liblept1753.dll" for platform x64.
at InteropDotNet.LibraryLoader.LoadLibrary(String fileName, String platformName)
at InteropRuntimeImplementer.LeptonicaApiSignaturesInstance.LeptonicaApiSignaturesImplementation..ctor(LibraryLoader loader)
--- End of inner exception stack trace ---
at System.RuntimeMethodHandle.InvokeMethod(Object target, Object[] arguments, Signature sig, Boolean constructor)
at System.Reflection.RuntimeConstructorInfo.Invoke(BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
at System.RuntimeType.CreateInstanceImpl(BindingFlags bindingAttr, Binder binder, Object[] args, CultureInfo culture, Object[] activationAttributes, StackCrawlMark& stackMark)
at System.Activator.CreateInstance(Type type, BindingFlags bindingAttr, Binder binder, Object[] args, CultureInfo culture, Object[] activationAttributes)
at System.Activator.CreateInstance(Type type, Object[] args)
at InteropDotNet.InteropRuntimeImplementer.CreateInstanceT
at Tesseract.Interop.LeptonicaApi.Initialize()
at Tesseract.Interop.TessApi.Initialize()
at Tesseract.Interop.TessApi.get_Native()
at Tesseract.TesseractEngine..ctor(String datapath, String language, EngineMode engineMode, IEnumerable1 configFiles, IDictionary2 initialOptions, Boolean setOnlyNonDebugVariables)
Locally in VS 2017 for debug builds it works fine but when make it a Release build and publish my console application when I install the application I get the error. I am at a loss of what is going on. I am running this on a windows 10 machine.
Any ideas? Sorry if I am asking in the comments as opposed to opening a new issue but saw this as similar to what I am facing. I tried to enable the diagnostics not too sure what I am doing wrong but I can not get the system diagnostics to work (could be I have looked at the problem long enough to get a cloudy thought process going). Any pointers will be greatly appreciated.
ooh when I look under the bin output folder I can see the x64 folder with the dlls. It is only after I install the application (on the same machine i.e my dev machine as opposed to running it from VS 2017 in debug mode) and run it from the Start menu that it all goes away from me.
Found out what my error was. For publishing my app in VS 2017 it was being pushed out as a click once app but the dlls were not being copied into the setup folders.
Install Visual C++ Redistributable for Visual Studio 2015
from link https://www.microsoft.com/en-us/download/details.aspx?id=48145
I am having the same issue. The files are on the folder and the redistributables are installed. Tried to change the platform target to x86 but no luck.
Install Visual C++ Redistributable for Visual Studio 2015
from link https://www.microsoft.com/en-us/download/details.aspx?id=48145
This worked for me with no additional changes. Thanks.