Not able to find cufft.h in eclipse

Hello Members,

I am new to cuda computing paradigm. we have an application built on eclipse IDE using c/c++ and openCV. To increase the performance of the application, we have decided to port some function calls (fft & ifft) onto the device. Anyway we decided to testto use “cufft.h” library from “/usr/local/cuda-8.0/include/” to do our fft & ifft work. As I am tried to include the library and headfile into eclipse environment and build the applicaiton, I am getting an error “make: *** [test_2dfft_v0.1] Error 1”. I created a file for the device as and just tried to include the header as:

#include <cufft.h>

…and I am getting the following error.

Building target: test_2dfft_v0.1
Invoking: GCC C++ Linker
g++ -L/usr/local/lib/ -L/usr/share/doc/cuda-cufft-8-0 -L/usr/local/cuda-8.0/lib64/ -L"{lib, lib64}/" -L/usr/local/cuda/include -L"/usr/local/cuda/lib64" -L/usr/local/cuda/bin/ -L/usr/local/cuda/lib64/ -o “test_2dfft_v0.1” ./2dfft.o ./fft.o ./main.o -lopencv_core -lcuda-cufft-8-0 -lcufft -lm -lcuda -lcudart
g++: error: ./fft.o: No such file or directory
make: *** [test_2dfft_v0.1] Error 1

Would anybody guide me into proper path?

Thanks in advance,

It’s finding cufft.h

The thing it is not finding is fft.o, which is a compiled object, presumably from your own project:

g++: error: ./fft.o: No such file or directory

It’s not possible to say what exactly is the problem without more project details.

Presumably a missing dependency in the makefile. Based on the output shown, the link step clearly involves three object files:

./2dfft.o ./fft.o ./main.o

So all of these have to be built before linking can take place. OP mentions that they have a source file, which presumably is the origin of the object file fft.o. So it looks like a rule may be missing that relates .cu files to .o files, and invokes nvcc accordingly. I don’t use IDEs, so I wouldn’t know what steps to take in Eclipse to make sure the dependency .cu -> .o is enforced.