An error when using opencv to open the camera on the TX2(Jetpack-L4T-3.3)

I have successfully flashed my NVIDIA JETSON TX2 with Jetpack-L4T-3.3(with opencv 3.3.1),but I am not sure whether I have successfully configurated opencv on the device or not.With the intention of leveraging the camera on the device,I write some C++ codes and these codes were also compiled with g++ compiler successfully.However,an error occurred to me when I ran the executable file;the error is “Failed to open camera(camera is the name of my executable file)”.I have tried some solutions,but in vain.So,I am looking forward some useful suggestions from you!

We should have more information about your usecase.

What camera are you using? Could you share code or at least some snippet for us?