CUDA Toolkit 5.5 Incorrect Environment Variables

I recently installed the 5.5 Toolkit and noticed the following problem in the path environment variables. I am not sure if this has been covered already, but maybe this post will help someone else. This is on 64-bit Windows 7 with Visual Studio 2010.

Here are my CUDA-related environment variables after the 5.5 install. You’ll notice I have multiple toolkits installed.

C:\>set cuda
CUDA_BIN_PATH=C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v5.5bin
CUDA_INC_PATH=C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v5.5include
CUDA_LIB_PATH=C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v5.5lib\x64
CUDA_PATH=C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v5.5
CUDA_PATH_V4_0=C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v4.0\
CUDA_PATH_V4_1=C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v4.1\
CUDA_PATH_V5_0=C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v5.0\
CUDA_PATH_V5_5=C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v5.5

Note that CUDA_PATH and CUDA_PATH_V5_5 lack trailing backslashes. This results in the first three path variables being incorrect because they are missing a backslash after the “v5.5”.

We have an existing project that built fine with 5.0, but after I installed 5.5 and changed the build customization accordingly it would no longer compile because it could not find the necessary include files. I added a trailing backslash to CUDA_PATH and CUDA_PATH_V5_5 and restarted Visual Studio and then the project compiled successfully.

Here are the environment variables after the changes:

CUDA_BIN_PATH=C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v5.5\bin
CUDA_INC_PATH=C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v5.5\include
CUDA_LIB_PATH=C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v5.5\lib\x64
CUDA_PATH=C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v5.5\
CUDA_PATH_V4_0=C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v4.0\
CUDA_PATH_V4_1=C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v4.1\
CUDA_PATH_V5_0=C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v5.0\
CUDA_PATH_V5_5=C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v5.5\

Mike