eclipse CDT with CUDA How to config CDT for cuda

How to configuer eclipse CDT for CUDA?

or which IDE do you always use for CUDA develop on Linux?

it is rather simple.

  1. install/extract cdt

  2. make a new “Makefile c/c++ project”

  3. add all files

  4. set build options

  5. set run or debug options

  6. run/debug

I see. thank you.

But cdt doesnot recognize .cu file!

all the fonts and color are black and dull…

  1. install/extract cdt
  2. make a new “Makefile c/c++ project”

These first two steps actually are somewhat simple.

  1. add all files

Do you mean add all file types so that Eclipse can recognize them? Or add all files from a CUDA code example to the project?

I assume you mean import the files you want from some example. So, I might, with my new project highlighted go to File → Import → General → File System and browse to the sample project called particles. For me, this folder is in: C:\Program Files\NVIDIA Corporation\NVIDIA CUDA SDK\projects\particles. Make sure all the files are selected.

A question before we can consider the build options is what should the makefile look like? For someone new to CUDA this is not obvious.

  1. set build options

Set build options to what? The options are found under Project → Properties → C/C++ Build

  1. set run or debug options
  2. run/debug

We can’t do these final steps until we have the binaries so, we need to solve the make file mystery first.

I’m currently at this stage, fzhsheng, and hope to write a more helpful guide to setting up CUDA in Eclipse soon.

-Crys.

@ fzhsheng

window → preferences → C/C++ → File Types → New …

Pattern *.cu
Type: Anything you want

→ Close any cu files and reopen them.

So you will at least have some non black fonts ;)