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?
vc_redist.x64.exe
does not install debug runtime so make sure that executable is linked against release runtime libraries. – user7860670