# CUDA Development with CDT on windows

**URL:** <https://forums.developer.nvidia.com/t/cuda-development-with-cdt-on-windows/22097>\
**Category:** CUDA Programming and Performance\
**Created:** [April 20, 2011, 2:55pm UTC](https://forums.developer.nvidia.com/t/cuda-development-with-cdt-on-windows/22097 "2011-04-20T14:55:12Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![xpc](https://developer.download.nvidia.com/images/forums/profile-default-devtalk-84.png) [@xpc](https://forums.developer.nvidia.com/u/xpc)\
**Post date:** [April 20, 2011, 2:55pm UTC](https://forums.developer.nvidia.com/t/cuda-development-with-cdt-on-windows/22097/1 "2011-04-20T14:55:12Z")

</div>

C++ editor in VC is so weak, I like to use CDT to develop C++ apps.

It’s avalible to use CDT to develop cuda apps on windows.

Follow these step:

1.Of course,you need CDT ,Cygwin , Mingw installed on windows;

2.Install cuda toolkit,SDK compatible with you cuda driver(can view in nvidia panel);

3.VC compiler is esencial for nvcc on windows, you can install VS C++ Express edition

(note: the nvcc in CUDA 3.2 can only compatible with VC compiler 8/9,so it cant work with VS2010)

4.Set system environment. now added the path “…\NVIDIA GPU Computing SDK 3.2\shared\inc” and “…\NVIDIA GPU Computing SDK 3.2\C\common\inc” in CUDA\_INC\_PATH, add CUDA\_LIB\_PATH “…\Program\NVIDIA GPU Computing SDK 3.2\C\common\lib” and “…\Program\NVIDIA GPU Computing SDK 3.2\shared\lib”;

5.Open CDT, create new C++ project with the type MakeFile and toolchains Cygwin GCC;

6.Set project properties.In C++/C build–\>Environment, add variable PATH , LIB, INCLUDE with following value:

PATH: ${CUDA\_BIN\_PATH};the dir of Cygwin\bin;the dir of MinGW\bin;the dir of \VC\bin;

LIB: ${CUDA\_LIB\_PATH};the dir of \VC\lib;the dir of Microsoft SDKs\Windows\v6.0A\Lib;

INCLUDE: ${CUDA\_INC\_PATH};the dir of \VC\include;

7.add \*.cu file type into performence–\>C/C+±-\>file type

8.Write a makefile in project. A simple example:

```auto
CXX = nvcc

app = cudatest.exe

obj = debug/cudatest.o

src = src/*.c*

traget=debug/$(app)

$(traget): $(obj)

	$(CXX) $(src) -o $(src)

	

all: $(traget)

```

1. Ok, program in a \*.cu file then build and run it.

2. Good luck, it’s effective in my CDT, the nvcc can compile the \*.cu file.
