Laex / Delphi-OpenCV-Class

Experimental Delphi binding for OpenCV 4.XX
Apache License 2.0
87 stars 26 forks source link

Samples - unable to run #15

Closed BennieC closed 2 years ago

BennieC commented 2 years ago

I have tried to run any of the samples. After locating a vcruntime140_1d.dll online and loading it into system32 I get the following error

videocapture.exe - Application Error The application was unable to start correctly (0xc000007b). Click OK to close the application.

I get the same if I run in non-debug mode. Any idea on how to trace the problem as I see no debug information

Laex commented 2 years ago

I have Visual Studio Community Version 17.1 installed (https://visualstudio.microsoft.com/en/free-developer-offers/), which installed debug versions of dynamic libraries, including vcruntime140_1d.dll - size 54192 bytes, version 14.31. 31103.0. With this library in debug mode, everything starts up fine. Perhaps you have vcruntime140_1d.dll installed together with another program - a different version, not the one with which the dlls from OpenCV were compiled. For installation of debug versions, see the discussion in https://developercommunity.visualstudio.com/t/visual-c-debug-redistributables/220262

Laex commented 2 years ago

To disable the use of debug dlls - comment line {$DEFINE USE_DEBUG_DLLS} // Use debug OpenCV and VisualStudio's DLLs. in opt.inc

BennieC commented 2 years ago

Apologies for not responding sooner but I was dragged away from this project. I did not find the line that indicates the use of DEBUG_DLLS in opt.inc. I did include it and tried also with UNDEF but still have the same problem. Running in Release mode works but does not help my own debugging needs.