-
-
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
Errors while building OpenCVSharp from source #1668
Comments
@toita86 |
So, I have compiled and I think in a successful manner, here it is the output
There are a couple of warning but I don't know if they are the cause of my problem.
I'm new to visual studio and usually don't develop for win. Let me know if I did something wrong @AvenSun |
everything looks correct if you built solution successfully. by the way, since you have enabled CUDA, it would be advisable to enable CUDNN as well via WITH_CUDNN. libraries listed below are needed when WITH_CUDA and WITH_CUDNN enabled.
you should append these files to Additional Dependencies of project OpenCvSharpExtern, and make sure the path including these libraries have been set correctlly. the path looks like below.
then you can try building the project again. |
Thank you for the reply @AvenSun, I appreciate the help.
but i still get the errors, is it possible to be the fault of the NVIDIA Video Codec SDK? |
@toita86 files listed above is enough to run OpenCV DNN with CUDA enabled. Additional Dependecies should not only include CUDA && CUDNN files but also the OpenCV libraries enabled and needed. it might be like below according to your log motioned above.
then you can have a try. |
Perfect, thank you @AvenSun, the linkage error is not showing anymore!
|
@toita86 |
@AvenSun |
If the project OpenCvSharpExtern compilation failed, you shouldn't be able to get the DLL files. actually this message was caused by the failure of post build event. as you can see, there're several lines command about copy.
so you can clear this post build event and copy manually, or modify copy command correctly. |
Thank you very much for the help @AvenSun, I really appreciate the time you spent to help me. I have just one last question how I can use this built version of OpenCvSharp in my project? |
you're welcome! to use your own build, there's no need to add package of OpenCvSharp4.runtime.win via Nuget. just copy OpenCvSharpExtern.dll and opencv_videoio_ffmpeg490_64.dll to corresponding place. that's it. |
@AvenSun I have copied the files in the folder of the project. But it does not work. |
@toita86 |
@AvenSun I have downloaded via Nuget only |
@toita86 |
@AvenSun I'm starting to think that I have produced every possible error in this process XD. I don't have a lot of knowledge on this so I don't really know what to do |
generally you can just copy the missing libraries within the first level of node somthing looks like the attached image below (marked with yellow) |
@AvenSun |
the native OpenCvExtern.dll was built in 64bit, so make sure your console app was built in AnyCPU or 64 bit. you can find this setting in property of console project. |
@AvenSun, I was able to get it to work after i have moved all the dll in the folder in Thank you a lot for the help! I'm really grate full. |
glad to hear that. you're welcome. |
@toita86 hello i am trying to build opencvsharp for gpu too, i have completed step 1 & 2, opencv is built with cuda, opencvextern is built and create dll,pdb,lib & exp files. now whats the next step for it, i am unable to compile opencvsharp project, how do i link it all? |
Summary of your issue
Hi, I'm trying to build opencvsharp form source but after building as written on the docs a little bit of problems with the linkage I'm stuck with this errors.
Environment
I'm on a windows machine with win11
What did you do when you faced the problem?
I have tried to give all the possible additional .lib files in the Linker -> Input -> Additional Dependecies but nothing of that worked.
I have followed the solution proposed here #967 but the case is different for me.
Sorry to bother @AvenSun, if you have any suggestion I will be happy to try it.
The text was updated successfully, but these errors were encountered: