I am trying to implement CURAND in my project and am getting “error LNK2005” when compiling.
Here is the basic framework of the code:
[File gpu_include.h]
…
#include <curand_kernel.h>
…
[File gpu.cu]
#include “gpu_include.h”
int main(int argc, char** argv)
{
…curand initialization and calls from Device API Example in CURAND_Library documentation
}
[File gpu_kernel.cu]
#include “gpu_include.h”
//curand device calls
global void setup_kernel(curandState *state)
{
…
}
global void generate_kernel(curandState *state, float * result)
{
…
}
Any suggestions would be appreciated, I’m using win7x64 VS2008 and CUDA 4.1
Thanks!