我在 Visual Studio 203 中使用 Tesseract 库。但是应用程序因以下异常而崩溃:
{System.TypeInitializationException: The type initializer for 'LParking.Base.Global' threw an exception. --->
System.IO.FileLoadException: Could not load file or assembly 'CPPWrapper.dll' or one of its dependencies. The application has failed to start because its side-by-side configuration is incorrect.
Please see the application event log or use the command-line sxstrace.exe tool for more detail.
(Exception from HRESULT: 0x800736B1) at LParking.Base.Global..cctor() --- End of inner exception stack trace --- at LParking.MainWindow..ctor() in e:\TIN HOC\Learning\Chuong Tring Dao Tao\Working\Main_Code\LParking\branches\LParking\LParking\MainWindow.xaml.cs:line 33} EVENT LOG DETAIL Activation context generation failed for "E:\TIN HOC\Learning\Chuong Tring Dao Tao\Working\Main_Code\LParking\branches\LParking\Bin\x86\Debug\libtesseract302d.dll". Dependent Assembly Microsoft.VC90.DebugCRT,processorArchitecture="x86",publicKeyToken="1fc8b3b9a1e18e3b",type="win32",version="9.0.21022.8" could not be found.
Please use sxstrace.exe for detailed diagnosis.
请注意:当我在 Release模式下构建应用程序(使用 libtesseract302.dll)时,它工作正常。但是当在 Debug模式下构建应用程序 (libtesseract302d.dll) 时,它崩溃了,正如我上面提到的!
最佳答案
跟踪的最后一行表示缺少 VC2008 (VC90) 库。从 http://www.microsoft.com/en-gb/download/details.aspx?id=29 获取它们
关于c++ - 加载 libtesseract302d.dll 时崩溃?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/24691496/