cmake should have generated an INSTALL project, run build that , and all you need will be copied to an ‘install’ folder
(or whatever you set CMAKE_INSTALL_PREFIX to)
I think ALL_BUILD is the default target and he pressed the green arrow next to “Local Windows Debugger” which built the target and tried to execute it.
Right click INSTALL under CMakeTargets and select Build.
True, i shouldn’t run Visual Studio as Administrator.
I use an account with no administrator rights on my computer, not because it’s not my computer and i can’t access the administrator account, but because it’s something that i learnt about security off Unix-like systems.
I’m not used to working with Visual Studio, i will be giving your suggestion a try since i’ve managed to get farther with Windows than i did with Debian. Ubuntu 20.04 was somehow installing CUDA and cudnn correctly. Ubuntu 22.04 doesn’t even boot properly on my computer. But that’s beyond the scope of this thread and forum.
I’ll give your suggestions a try and then i’ll post whether i managed it or not.
How i managed the Release/ALL_BUILD , it was the default when i started Visual Studio as cudawarped mentioned.
You can run the test/perf/sample programs but that’s it.
Your original question was regarding the header files, which implies you want to write your own program which links against the library, but your post above implies you want to do something with python which is it?
I’m trying to run the default INSTALL with only the CUDA flags enabled in cmake.
I’m not however getting any hints where INSTALL wants to copy the files to on Visual Studio’s terminal output, only the access is denied error… I’ve already set INSTALL as the default project in Visual Studio, but running it only throws the error and that output during build that i’ve posted previously.
Your original question was regarding the header files, which implies you want to write your own program which links against the library
There’s a folder named install inside opencv’s build directory, with bin, etc, include and x64 folders. The include folder contains the header files, whilst x64\vc17\lib contains the libraries.
You are confusing running with building. You can’t run all CMake targets, you should be able to build all of them but then you can only run executables. That is you build a library and a target which INSTALL’s OpenCV.
Visual studio lets you run all targets as they appear as projects but all that does is execute whatever is given in
Properties->Debugging->Command, which defaults to $(TargetPath).
I think “running” a build/install is an acceptable choice of words.
opencv by default installs all the dlls and libs etc… into that “install” dir under its build directory. that is configurable via cmake. that location is okay to keep.
the python stuff is supposed to be sent into whatever python was found by cmake.
at least, I think so. it’s been a while since I built opencv myself. there might be a different target that copies the files to Python. if you hadn’t removed part of the log of your INSTALL build, I might be able to tell.
you’ll want to find a file named cv2.pyd or cv2.cp39-win_amd64.pyd (or cp312 or whatever python you have). you can copy that yourself into the right place inside your python installation.
instead of the single “world” dll, you probably have a bunch of individual module dlls. you can either copy those, or extend your system PATH to include the directory where they do live. I’d suggest that be their location in the build/install/ directory (x64/vc??/bin).