运行NVIDIA opencl示例程序出错

6 篇文章 0 订阅

今天下载了NVIDIA opencl官网的示例程序,没一个能运行的,于是一顿好找,最后还是谷歌给力,原因如下:

代码下载地址:https://developer.nvidia.com/opencl  

报错:警告 1 warning MSB8012: TargetPath(D:\360安全浏览器下载\oclBandwidthTest\NVIDIA GPU Computing SDK\OpenCL\common\lib/Win32\oclUtils.lib) does not match the Library's OutputFile property value (D:\360安全浏览器下载\oclBandwidthTest\NVIDIA GPU Computing SDK\OpenCL\common\lib\Win32\oclUtils32D.lib). This may cause your project to build incorrectly. To correct this, please make sure that $(OutDir), $(TargetName) and $(TargetExt) property values match the value specified in %(Lib.OutputFile). C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V120\Microsoft.CppBuild.targets 1361 5 oclUtils
警告 2 warning MSB8012: TargetName(oclUtils) does not match the Library's OutputFile property value (oclUtils32D). This may cause your project to build incorrectly. To correct this, please make sure that $(OutDir), $(TargetName) and $(TargetExt) property values match the value specified in %(Lib.OutputFile). C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V120\Microsoft.CppBuild.targets 1363 5 oclUtils
错误 3 error MSB3073: 命令“mkdir ..\bin\Win32\Debug
copy ..\..\shared\bin\win32\Debug\*.dll ..\bin\Win32\Debug
copy *.bat ..\bin\Win32\Debug


:VCEnd”已退出,代码为 1。 C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V120\Microsoft.CppCommon.targets 132 5 oclUtils
错误 4 error C1083: 无法打开包括文件: “exception.h”: No such file or directory d:\360安全浏览器下载\oclbandwidthtest\nvidia gpu computing sdk\shared\inc\cmd_arg_reader.h 25 1 shrUtils
错误 5 error C1083: 无法打开包括文件: “exception.h”: No such file or directory d:\360安全浏览器下载\oclbandwidthtest\nvidia gpu computing sdk\shared\inc\cmd_arg_reader.h 25 1 shrUtils
错误 6 error LNK1104: 无法打开文件“shrUtils32D.lib” D:\360安全浏览器下载\oclBandwidthTest\NVIDIA GPU Computing SDK\OpenCL\src\oclBandwidthTest\LINK oclBandwidthTest


解决方案:大概主要是因为版本不对引起的,操作系统版本,cuda版本,vs版本等,具体原因是(来自该网站 https://devtalk.nvidia.com/default/topic/643590/opencl-with-latest-drivers/)I got by the problem, and thought I'd let others know how:

I re-installed the CUDA SDK (cuda_5.5.31_win8.1_general_x64.exe), since it does a force install of the included driver.

I installed the DirectX SDK for version 11 from Microsoft's site on a Windows 7 PC. I moved the missing files (d3dx9*, d3dx10*, d3dx11*) from the SDK into the VS include and lib directories on my Windows 8.1 PC. Windows 8 & 8.1 does not include the d3dx9*, d3dx10* or d3dx11* includes and libs, so the only way to get the needed files is to use the older OS. I was then able to build and run the CUDA / OpenCL examples on my Windows 8.1 PC.


懒得实践了,我还是只读代码好了

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值