1
votes

Recently I wrote a program with VS2019, invoking Tesseract OCR dll compiled in C++ (x64) and display result on a .NET Windows form. Everything works fine on my Windows 10 dev PC. When deployed to Windows Server 2012 (x64), it crashed, complaining that the C++ dlls are not found.

What I tried:

  • Install vc_redist.x64.exe from Microsoft, it's still not work. (Maybe not enough?)
  • Run a simple .NET windows form program on that server, and it works well. (It's not a .NET problem)

Update:

I used Dependency Walker that @Fenixil suggested, and the dlls below are not found:

  • API-MS-WIN-CORE-KERNEL-32-PRIVATE-L1-1-1.DLL
  • API-MS-WIN-CORE-PRIVATEPROFILE-L1-1-1.DLL
  • API-MS-WIN-SERVICE-PRIVATE-L1-1-1.DLL
  • MF.DLL
  • MFPLAT.DLL
  • MFREADWRITE.DLL
  • API-MS-WIN-CORE-SHUTDOWN-L1-1-1.DLL
  • EXT-MS-WIN-NTUSER-UICONTEXT-EXT-L1-1-0.DLL
  • IESHIMS.DLL
  • SETTINGSYNCPOLICY.DLL
  • WLANAPI.DLL

Those dlls can be found in my dev PC, in C:/Windows/WinSxS, multiple files in same name under different directory. Do they belong to some Windows SP update, or are they in the Win10 platform API? What's the best way to install them instead of simply copying them to production server?

1
You need to provide those "not found" dlls. Note that vc_redist.x64.exe does not install debug runtime so make sure that executable is linked against release runtime libraries.user7860670
@VTT Hi I have a list of the dlls not found, is there any way to install them gracefully?Ted Yu
@Ted Yu please update your post if you managed to resolve the issue.fenixil

1 Answers

2
votes

There are multiple versions of vc_redist, you need to provide one that is used in your application. Here is some discussion with vc_redist not found, might be related to your issue.

You can use Dependency Walker tool to check which dlls are missing in the system