opencvsharp icon indicating copy to clipboard operation
opencvsharp copied to clipboard

NativeMethods `TryPInvoke` makes it difficult to initialize the library

Open benlongo opened this issue 9 months ago • 0 comments

Because TryPInvoke is called in a static initializer, it's difficult to change the native library loading behavior. For example, I'm trying to get this to run on an OSX laptop, and I had to do some hacky stuff to load libOpenCvSharpExtern.dylib via ModuleInitializer.

Why is TryPInvoke required?

benlongo avatar Mar 22 '25 20:03 benlongo