0

I'm using source code from here. It's about Extended GMM for Background Subtraction on GPU using CUDA and OpenCV. I'm totally new to CUDA and I got an error in MVS 10

1>d:/MVS10 Projects/CudaTest/CudaTest/CvFastBgGMM_ver5.cu(227): error : identifier "CUDA_SAFE_CALL" is undefined

1>
1> 5 errors detected in the compilation of

"C:/Users/DELL/AppData/Local/Temp/tmpxft_00000e34_00000000-5_CvFastBgGMM_ver5.cpp1.ii".
1>C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\BuildCustomizations\CUDA 5.0.targets(592,9): error MSB3721: The command ""C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v5.0\bin\nvcc.exe" -gencode=arch=compute_10,code=\"sm_10,compute_10\" --use-local-env --cl-version 2010 -ccbin "D:\IDE\Microsoft Visual Studio 10.0\VC\bin\x86_amd64"  -I"D:\SDK\OpenCV\opencv\build\include" -I"D:\SDK\OpenCV\opencv\build\include\opencv" -I"C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v5.0\include" -I"C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v5.0\include" -I"C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v5.0\include"  -G   --keep-dir "x64\Debug" -maxrregcount=0  --machine 64 --compile  -g   -DWIN32 -D_DEBUG -D_CONSOLE -D_UNICODE -DUNICODE -Xcompiler "/EHsc /W3 /nologo /Od /Zi /RTC1 /MDd  " -o "x64\Debug\CvFastBgGMM_ver5.cu.obj" "d:\MVS10 Projects\CudaTest\CudaTest\CvFastBgGMM_ver5.cu"" exited with code 2.

I installed CUDA version 5.0. What am i missing? Please help me. Thanks you!

user2228836
  • 21
  • 1
  • 3
  • 1
    This is an function call from CUDA SDK. Refer to this one: http://stackoverflow.com/questions/12474191/cuda5-examples-has-anyone-translated-some-cutil-definitions-to-cuda5 – lashgar Mar 31 '13 at 08:53

1 Answers1

9

CUDA_SAFE_CALL was part of the old cutils library. The cutil library was solely for simplifying the SDK samples, and wasn't supposed to be used by the user. In CUDA 5.0 it was removed, which is why you can't find it.

Take a look at What is the canonical way to check for errors using the CUDA runtime API? to see how you should go about replacing CUDA_SAFE_CALL.

Community
  • 1
  • 1
alrikai
  • 4,123
  • 3
  • 24
  • 23