Hello all,
I am running a very basic cufft program (from Nvidia website) just to get to grips with it…
#include "cuda_runtime.h"
#include "device_launch_parameters.h"
#include <cufft.h>
#include <stdio.h>
int main()
{
#define NX 256
#define BATCH 10
cufftHandle plan;
cufftComplex *data;
cudaMalloc((void**)&data, sizeof(cufftComplex)*(NX / 2 + 1)*BATCH);
/* Create a 1D FFT plan. */
cufftPlan1d(&plan, NX, CUFFT_R2C, BATCH);
/* Use the CUFFT plan to transform the signal in place. */
cufftExecR2C(plan, (cufftReal*)data, data);
/* Destroy the CUFFT plan. */
cufftDestroy(plan);
cudaFree(data);
return 0;
}
I have added the “cufft.lib” to additional libraries in the linker, added the directory and changed the architecture to x64. However, i still get…
Error 1 error LNK2019: unresolved external symbol cufftPlan1d referenced in function main
Error 2 error LNK2019: unresolved external symbol cufftExecR2C referenced in function main
Error 3 error LNK2019: unresolved external symbol cufftDestroy referenced in function main
Error 4 error LNK1120: 3 unresolved externals
How can I fix this?
Thanks