External Dependencies

Hello,

I am trying Cuda Examples for further learning. However if i generate a new Cuda Project and copy the kernel (ex: simpleCUFFT which is single file) I am receiving errors. Original project works perfectly fine.

When i check External Dependencies of original cuda example there are way more files in the list.

Why is that…? and What should i do…?

Thank you…

You will probably need to add cudart and cufft libraries to your link specification. Also, most of the sample codes have dependencies on various helper files that are included from the samples\common\inc directory. Some will also depend on various libraries that are common to the samples and are built as part of a full samples build. If you’re unfamiliar with managing projects or how to interpret errors associated with missing includes and missing link specifications, it’s going to be fairly tedious to work through these.

It’s also unclear from your question which IDE you are using and on which platform. Different IDEs have different methods for specifying includes and link items.

It is Visual studio 2013… Windows 8…

even a hint would help alot…

CUDA 7.5?

If you started with CUDA 7.5 and started a new CUDA runtime project in VS 2013, the basics should be set up (basic cuda compilation/includes and cudart library).

You will need to add anything that references sample includes and also the CUFFT library if you are using that.

Here’s a writeup about how to add a CUDA library to a CUDA project in VS:

http://stackoverflow.com/questions/13570285/how-to-link-library-e-g-cublas-cusparse-for-cuda-on-windows/13588857#13588857

If you’re trying to set up a new project that will also reference cuda sample code include files, that will be a separate modification to the VS project file.

I thank for the reply…

I am not that familiar with VS since mostly used gcc … Currently i have to use a windows machine…

You might be better off with cmake.
See examples at http://stackoverflow.com/questions/13073717/building-cuda-object-files-using-cmake and http://www.roxlu.com/2013/011/basic-cuda-example
See also the options of the FindCUDA module