Cannot add curand library in my project

Good evening,
im using toolkit 4.0 which supports I can ensure that this file exists indeed in usr/local/cuda/lib . But i cannot use the functions curand provides.
I know somehow i need to show to the compiler where to look but I cannot find how to do it.
This my Makefile

Add source files here

EXECUTABLE := tspshared

Cuda source files (compiled with cudacc)


C/C++ source files (compiled with gcc / c++)

CCFILES := tsp.cpp cpu_tsp.cpp sobol_gold.cpp sobol_primitives.cpp

Rules and targets

verbose := 1
#dbg := 1
CUDACCFLAGS := --ptxas-options=-v
INCLUDES := -I…/common/inc

include …/common/

As you can see there is another file (,which holds other modifications for CUDA.
Please someone tell me what to do.I know that propably this is not very difficult but it wastes me so much productive time.
Thanks in advance.


just add the following line into your Makefile

Thats right it needs this USECURAND:=1 into the Makefile.
but i also had to download the latest i should have done it before the curand issue but i post this because this problem may arise to other users too.