cuDNN code sample compile error

I’m trying to install cuDNN library and run the code sample, but it’s giving me more than 100 errors when compiling:

.../cuda-workspace/cuDNNtest/UtilNPP/ImageIO.h:40: undefined reference to `FreeImage_SetOutputMessage'
.../cuda-workspace/cuDNNtest/UtilNPP/ImageIO.h:42: undefined reference to `FreeImage_GetFileType'

[…]

.../cuda-workspace/cuDNNtest/Debug/../mnistCUDNN.cpp:264: undefined reference to `cudnnCreate'
.../cuda-workspace/cuDNNtest/Debug/../mnistCUDNN.cpp:264: undefined reference to `cudnnCreate'

I’m using Nsight Eclipse Edition on Linux centOS, cuda toolkit 7.5 and Titan X (compute capability 5.2, I think).

I already have the cudnn.h file in usr/local/cuda-7.5/include/ and the libraries files in usr/local/cuda-7.5/lib64/, so I don’t know what the problem is.

Thank you in advance.

Please provide the complete compile commands exactly as issued by Nsight EE. Are you building this using a project file that came with the sample code? Or did you create your own project/file?

I am using the project file that came with the sample code. I created the project selecting the “Makefile project with existing code” option.

EDITED
It’s solved! Thank you.
NVCC Linker wasn’t specifying all the libraries needed.