Problem FFT identifier "CUFFT_DATA_C2C" is undefined and identifier "c

Hello everyone:

I have problems with FFT try to run something I get the same error, what can it be?

#define NX 200

#define NY 100

cufftHandle plan;

cufftComplex *data1, *data2;

cudaMalloc((void**)&data1, sizeof(cufftComplex)*NX*NY);

cudaMalloc((void**)&data2, sizeof(cufftComplex)*NX*NY);

/* Create a 2D FFT plan. */

cufftPlan2d(&plan, NX, NY, CUFFT_DATA_C2C);

/* Use the CUFFT plan to transform the signal out of place.


cufftExecute(plan, data1, data2, CUFFT_FORWARD);

/* Inverse transform the signal in place */

cufftExecute(plan, data2, data2, CUFFT_INVERSE);

/* Destroy the CUFFT plan. */


cudaFree(data1); cudaFree(data2);

I don’t use the cuFFT lib very often, but it looks like CUFFT_DATA_C2C has been replaced by CUFFT_C2C.


I think it’s a problem with the configuration that I always get the same error or cutil non esiste.

That can happen?

hi the new problem is this

uda@avalon:~/NVIDIA_GPU_Computing_SDK/C/src/vectoresCuda$ nvcc -o fft error: identifier "cufftExecute" is undefined

1 error detected in the compilation of "/tmp/tmpxft_00001d56_00000000-4_fft.cpp1.ii".

the code is

I follow the documentation from NVIDIA, which I have to use?

The problem is that you’re compiling code that was written for a different version of the cuFFT library than the one you have installed.
Download the documentation for your installed version and see which function you need to call.
It’s probably something like cufftExecC2C instead of cufftExecute.


continued with the same problems the only thing I need is to make fft and ifft this is a code

i’ve a problem , i need use the FFT2 and IFFT2 but always i’ve the same output
undefined reference to cufftPlan2d' and undefined reference to cufftExecC2R’ and
undefined reference to `cufftDestroy’ . Why? the code is this i use a manual about 2.3

If you don’t have any idea what an undefined reference is (or are too lazy to google it) I suggest you adapt the simpleCUFFT example in
It has a makefile that loads the required libraries. I suggest you take a look at the makefile in that directory and the file in NVIDIA_GPU_Computing_SDK/C/common
before blindly calling nvcc and being surprised that you get a bunch of undefined references.


No. I’ve done that, I also searched google, in the IRC channel, twitter but thanks anyway

If you look at the makefile for simpleCUFFT, you’ll see




include ../../common/

and in

CUDA_INSTALL_PATH ?= /usr/local/cuda




ifeq ($(USECUFFT),1)

  ifeq ($(emu),1)

	LIB += -lcufftemu


	LIB += -lcufft



This means that it will link with in /usr/local/cuda/lib or something similar.

If you don’t link with this library you will get undefined references for your cufft calls.