简体   繁体   English

使用VS2010打开CUDA SDK示例时发生错误

[英]A error occurred when open a CUDA SDK example using VS2010

I have installed cudatoolkit_3.2.16_win_64 and gpucomputingsdk_3.2.16_win_64. 我已经安装了cudatoolkit_3.2.16_win_64和gpucomputingsdk_3.2.16_win_64。 When I choose a example of the SDK, I get this error: 当我选择一个SDK示例时,出现以下错误:

The imported project "C:\\Program Files (x86)\\MSBuild\\Microsoft.Cpp\\v4.0\\BuildCustomizations\\NvCudaRuntimeApi.targets" was not found. 找不到导入的项目“ C:\\ Program Files(x86)\\ MSBuild \\ Microsoft.Cpp \\ v4.0 \\ BuildCustomizations \\ NvCudaRuntimeApi.targets”。 Confirm that the path in the declaration is correct, and that the file exists on disk. 确认声明中的路径正确,并且文件在磁盘上。 C:\\ProgramData\\NVIDIA Corporation\\NVIDIA GPU Computing SDK 3.2\\C\\src\\template\\template_vc90.vcxproj C:\\ ProgramData \\ NVIDIA Corporation \\ NVIDIA GPU计算SDK 3.2 \\ C \\ src \\ template \\ template_vc90.vcxproj

And in the Solution Explorer, it shows "template(unavailable)""the project file was unloaded". 并且在解决方案资源管理器中,它显示“模板(不可用)”“项目文件已卸载”。

How to fix this error? 如何解决这个错误?

3.2 now works with the latest bits. 现在可以使用最新版本的3.2。 Horray! 霍雷! The simplest way to get this working is to install NSight 1.51 and this gets you the build rules installed in the right place for 3.2. 完成此工作的最简单方法是安装NSight 1.51,这将使您将构建规则安装在正确的位置以安装3.2。

Here are two tutorials on getting started with CUDA and Visual C++ 2010: 这是有关CUDA和Visual C ++ 2010入门的两个教程:

http://blog.cuvilib.com/2011/02/24/how-to-run-cuda-in-visual-studio-2010/ http://blog.cuvilib.com/2011/02/24/how-to-run-cuda-in-visual-studio-2010/

http://www.ademiller.com/blogs/tech/2011/03/using-cuda-and-thrust-with-visual-studio-2010/ http://www.ademiller.com/blogs/tech/2011/03/using-cuda-and-thrust-with-visual-studio-2010/

There's also a post on the NVIDIA forum: NVIDIA论坛上还有一篇文章:

http://forums.nvidia.com/index.php?showtopic=184539 http://forums.nvidia.com/index.php?showtopic=184539

As far as I know, you can't have v3.2 with VS2010 because it ain't supported yet. 据我所知,您无法在VS2010上安装v3.2,因为尚不支持它。

But you could fallback to 3.1 if you would like to keep using VS2010: 但是,如果您想继续使用VS2010,则可以降级到3.1:

CUDA + VS2010 without VS2008 没有VS2008的CUDA + VS2010

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM