#include <curand_kernel.h> gives errors

When I include curand_kernel.h I get the following errors during compile on Windows 10.

C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v11.2\bin/…/include\cuda.h(1837): error: expected a “)”
C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v11.2\bin/…/include\cuda.h(15259): error: expected a “)”
C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v11.2\bin/…/include\cuda.h(15301): error: expected a “)”
C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v11.2\bin/…/include\cuda.h(15353): error: expected a “)”
C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v11.2\bin/…/include\cuda.h(15399): error: expected a “)”
C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v11.2\bin/…/include\cuda.h(15422): error: expected a “)”

Compile command:
nvcc -DWIN64 --gpu-architecture=compute_35 --gpu-code=compute_35,sm_35 --shared --use_fast_math

I searched this for a while but could not find any solutions or similar problems.

If you’re including this in a file that ends in .cpp, then that is a mistake. Otherwise you need to provide a more complete example, and it may be that your CUDA install is broken.

All files end in .cu
I will try reinstalling the Toolkit, thank you

Error resolved by moving #include <curand_kernel.h> all the way to the top, above .cuh includes!