Invalid redeclaration of type "uint64" in cuRAND library with opencv library included

I am working on a program which uses opencv to read image file and would like to use curand library to generate random numbers to assist image processing. However, when I included the <curand_kernel.h>, the compilation returns an error saying that :
“/usr/local/cuda-5.5/bin/…/targets/x86_64-linux/include/curand_philox4x32_x.h(88): error: invalid redeclaration of type name “uint64”

I tried to wrap the statement of “typedef xxxxx uint64” in each file with #ifndef uint64 and #endif. However, the same error still comes out. I don’t know what to do now.

Can anyone shed light on this problem? Many thanks!

We also experience the same issue on Ubuntu 14.04 with OpenCV 2.4.8 and nvidia-cuda-dev 5.5.22.
The system paths for the conflicting typedef definitions are:

I can’t seem to find an Nvidia / CUDA bug tracker to submit this to though.

If you sign up as a registered developer at, you can file bugs directly with NVIDIA.