使用 VS5 编译 CUDA 2012 时出现错误"nvcc cannot find a supported cl version"

Error "nvcc cannot find a supported cl version" when compiling CUDA 5 with VS2012

本文关键字:cannot nvcc find supported version cl 错误 CUDA 编译 VS5 2012      更新时间:2023-10-16

我按照这里的说明编译cuda 5与visual studio 2012,但我仍然收到这个:

nvcc : fatal error : nvcc cannot find a supported cl version. Only MSVC 9.0 and MSVC 10.0 are supported

什么会导致这个问题?

如果你的代码使用动态并行,你需要使用msvc2010

至少对我来说,Corvella的答案起作用了,我用VS2012和CUDA支持构建了OpenCV 2.4.5(来自OpenCV官方网站)和Emgu(来自Emgu git,支持OpenCV 2.4.9),两者都成功了。我用的是Windows 7 64和Windows 8 64。当您错过某些.cu文件的"构建自定义"时,会发生错误。即使这只是开始,你也会遇到许多其他的错误。好运!