Compiler 'cl' in PATH different than the one specified with -ccbin

Getting this error with VS2012 Pro, CUDA 5.5 and Win 7. Checked and made sure the PATH variable has the right folder specified (VC\bin\amd64), so I don’t think that’s it.

I can compile with --ccbin successfully by using VS2012 pro/CUDA 5.5 my Win7 32bit system.see below:

C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v5.5\bin>nvcc.exe -o aaa -ccbin “C:\Program Files\Microsoft Visual Studio 11.0\VC\bin\amd64\cl.exe”

Creating library aaa.lib and object aaa.exp



Well, doing that appears to work (it creates the .lib and .exp files) without an issue. So now I need to figure out how to get VS2012 to do that because I still get the same error. I tried editing the CUDA 5.5 props file, but that didn’t help either.

Step1: you need to check CUDA build customization files are copied to “C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\BuildCustomizations”. Here below are files.
CUDA 5.5.xml
CUDA 5.5.targets
CUDA 5.5.props
If they don’t existed, please copy those files from “C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v5.5\extras\visual_studio_integration\MSBuildExtensions”.

Step2: Compiling Sample Projects. You can refer to the guide from

Step3: Build Customizations for New Projects. You can refer to the guide from

I’m having the same exact problems with CUDA 5.5 and Win7.

I have VS2008 and VS2012 installed. Cuda works with VS2008, but not VS2012, I get the same error (“Compiler ‘cl’ in PATH different than the one specified with -ccbin” when running nvcc.exe).

The error doesn’t make much sense, since

  1. What is the point of -ccbin if it has to be the same as is available in PATH?
  2. If I add -ccbin (“C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\bin”) to my PATH, I still get the same error

I tried following your steps, but no help.
Step1: these files were already there
Step2: Same problem
Step3: Same problem

This is a fresh VS2012 and CUDA install. Tried reinstalling but the error is still there.

Does anyone have a solution to this?

Please add this to Cuda 6.5 props.

Visual Studio 2010, 2012, 2013 are affected


This is in Msbuild directories.
All cuda versions are affected