-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Unable to build on ubuntu 20.04 #1388
Comments
Cool, I'm trying to use it in Ubuntu 20.04 as well and it is not working either. Getting this message: Unhandled exception. System.TypeInitializationException: The type initializer for 'OpenCvSharp.Internal.NativeMethods' threw an exception.
---> System.DllNotFoundException: Unable to load shared library 'OpenCvSharpExtern' or one of its dependencies. In order to help diagnose loading problems, consider setting the LD_DEBUG environment variable: libOpenCvSharpExtern: cannot open shared object file: No such file or directory
at OpenCvSharp.Internal.NativeMethods.redirectError(CvErrorCallback errCallback, IntPtr userdata, IntPtr& prevUserdata)
at OpenCvSharp.Internal.ExceptionHandler.RegisterExceptionCallback()
at OpenCvSharp.Internal.NativeMethods.LoadLibraries(IEnumerable`1 additionalPaths)
at OpenCvSharp.Internal.NativeMethods..cctor()
--- End of inner exception stack trace ---
at OpenCvSharp.Internal.NativeMethods.videoio_VideoCapture_new3(Int32 device, Int32 apiPreference, IntPtr& returnValue)
at OpenCvSharp.VideoCapture..ctor(Int32 index, VideoCaptureAPIs apiPreference)
at <StartupCode$example-opencv>.$Program.main@() in /home/gajo/Desktop/codes/example-opencv/Program.fs:line 3 |
You need to have OpenCvSharpExtern in your path or in your bin, have a look into the dockerfile, it will provide the instructions needed to build OpenCv and the wrapper library from source. You can than reference the compiled file in your project. I find using docker much easier when working with OpenCvSharp on ubuntu. |
Cool, thanks for the tip @CpBobette |
Summary of your issue
I am trying to setup my for .net6 on ubuntu 20.04, I was unable to build from source (probably from missing dependencies but I just gave up). I am now trying to go the docker way but once again the DockerFile fails on the OpencvSharp build with errors related to wechat_qrcode.
/opencvsharp/src/OpenCvSharpExtern/include_opencv.h:64:10: fatal error: opencv2/wechat_qrcode.hpp: No such file or directory
Environment
ubuntu 20.04
The text was updated successfully, but these errors were encountered: