0

so I've been trying to set up OpenCV for Python via manual compiling in order to benefit from the usuage of my GPU.

After a lot of errors, my current problem is that everytime I try to build it, it does so for around 20 minutes before it just stops. It doesn't stop with an error, but after trying a second time the last error before the stop was the same and the following:

A:\opencvpython\opencv_contrib-4.x\modules\cudawarping\test\test_remap.cpp(174,1): error C2065: "DIFFERENT_SIZES_EXTRA" : undeclared identifier [A:\opencvpython\build\modules\world\opencv_test_cudawarping.vcxproj] A:\opencvpython\opencv_contrib-4.x\modules\cudawarping\test\test_remap.cpp(199,1): error C2065: "DIFFERENT_SIZES_EXTRA" : undeclared identifier [A:\opencvpython\build\modules\world\opencv_test_cudawarping.vcxproj]

I know that the called file seems to have a problem with the identifer, but given the situation that I redownloaded OpenCV at from the official website, I thought that it maybe has to be something else.

I followed the steps from https://machinelearningprojects.net/build-opencv-with-cuda-and-cudnn/ and the only minor oversight I had was, that it didn't detect python3. It found the python (for build) which led to the correct python.exe (Anaconda), but didn't do so for the rest. So I manually added the lib, include, site-package and numpy path, but im still not 100% certain that this was enough.

I kinda came to a dead end, what I could think of is to download OpenCV again and maybe watch out that there is nothing wrong with the extracting process(???)

Thanks for anyone attempting to help! (Btw, I added the complete console log below) https://justpaste.it/8gba2

talonmies
  • 70,661
  • 34
  • 192
  • 269
Lukas.
  • 1
  • Did you check this: https://forum.opencv.org/t/opencv-recompile-with-cudnn-for-win10-undeclared-identifier-error/12076 ? – Markus Mar 31 '23 at 15:13
  • Hey, thanks for that post. One suggests that the error could be because of the wrong version of the contrib file, which I checked, I used the .x version and not .7 which could have been a problem. Now that I changed it, I did the build through Visual Studio. Although it said that there were no errors, the import still fails because the build doesn't create a config file for py3 / 3.10 (config-3.py/config-3.10.py). This could have something to do with me having Python installed on a different drive, but thats just a guess.. – Lukas. Apr 01 '23 at 22:38

0 Answers0