I’m using Qt to do C++ programming with cuda. In my code, function “cudaNV12ToRGBAf” is used and it is defined in cudaYUV-NV12.cu, so I added a line “#include cudaYUV-NV12.cu” in my code. When I compiled the code, I got error: ‘blockIdx’ was not declared in this scope.
Please help. Thanks.
It is a CUDA variable.
Please check your file is named as *.cu and compile it with nvcc.
Do you have any samples to show how to use nvcc in .pro file? Or, is it possible not to compile cudaYUV-NV12.cu, but use the library (.so file) instead?
There is a similar sample to link Jetson_inference libraries: