cuFFT undefined symbols for architecture x86_64

Hi, I’m trying to use cuFFT library but when I compile my project I have the error:

Undefined symbols for architecture x86_64:
“_cufftDestroy” …
“_cufftExecC2C” …
“_cufftPlan1d” …
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)

I’m using CUDA 7 and Eclipse Nsight on Mac XOS 10.10.3.
Other examples without cuFFT library correctly work. Are there other settings to do?

the linker can not find the cufft library

make sure to include a linker path to the library

Try building a cufft sample project (such as simpleCUFFT). If it builds correctly, then compare the differences between that project and yours.

Ok, I solved using the command line:

nvcc filename.cu -I/path_CUDA/include -L/path_CUDA/lib -lcufft

It executes, but execution is not deterministic: I don’t know why sometime the result is correct and sometime not.
Sometime I have also a segmentation fault

I tried with the simpleCUFFT in Eclipse Nsight: compilation is ok, but execution fails because of binary not found.