为VS2010,WINDOWS7,64BIT构建CUDA样本时出现错误MSB3721

时间:2013-11-19 05:36:27

标签: c++ visual-studio-2010 build cuda 64-bit

我已使用默认安装目录结构安装了CUDA 5.5 Production Release。 然后,我按照适用于Microsoft Windows的NVIDIA CUDA入门指南进行操作。

nvcc -V测试和deviceQuery.exe以及bandwidthTest.exe在windows命令提升中工作正常。

然后我尝试构建bandwidthTest项目(位于NVIDIA公司\ CUDA Samples \ v5.5 \ 1_Utilities \ bandwidthTest)

如下弹出一些错误:

1>------ Build started: Project: bandwidthTest, Configuration: Release x64 ------
1>Build started 2013/11/19 13:13:41.
1>AddCudaCompileDeps:
1>Skipping target "AddCudaCompileDeps" because all output files are up-to-date with respect to the input files.
1>AddCudaCompilePropsDeps:
1>Skipping target "AddCudaCompilePropsDeps" because all output files are up-to-date with respect to the input files.
1>CudaBuild:
1>  Compiling CUDA source file bandwidthTest.cu...
1>  'C:\Users\IMI_User\AppData\Local\Temp' is not recognized as an internal or external command,
1>  operable program or batch file.
1>C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\BuildCustomizations\CUDA 5.5.targets(592,9): error MSB3721: The command ""C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v5.5\bin\nvcc.exe" -gencode=arch=compute_10,code=\"sm_10,compute_10\" -gencode=arch=compute_20,code=\"sm_20,compute_20\" -gencode=arch=compute_30,code=\"sm_30,compute_30\" -gencode=arch=compute_35,code=\"sm_35,compute_35\" --use-local-env --cl-version 2010 -ccbin "c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\bin\x86_amd64"  -I./ -I../../common/inc -I"C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v5.5\include" -I"C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v5.5\include"     --keep-dir x64\Release -maxrregcount=0  --machine 64 --compile -cudart static -Xcompiler "/wd 4819"     -DWIN32 -D_MBCS -Xcompiler "/EHsc /W3 /nologo /O2 /Zi  /MT  " -o x64/Release/bandwidthTest.cu.obj "C:\ProgramData\NVIDIA Corporation\CUDA Samples\v5.5\1_Utilities\bandwidthTest\bandwidthTest.cu"" exited with code 1.
1>
1>Build FAILED.
1>

1)我在互联网上找到了一个解决方案:https://devtalk.nvidia.com/default/topic/533797/visual-studio-2010-how-to-fix-error-msb3721-exiting-with-code-1/ 这与我的情况非常相似。它提到它是导致此问题的防病毒软件。 所以我卸载了任何防病毒软件并重新安装了CUDA 5.5产品。重新启动计算机。但它没有解决我的问题。 2)我找到了另一个应该“以管理员身份运行”的解决方案。再说一次,它无济于事。 CUDA 4.2. toolbox & VS2010

我在NVIDIA Corporation \ CUDA Samples \ v5.5 \ 1_Utilities \ deviceQuery中构建另一个示例项目deviceQuery并且成功。

任何人都可以帮我解决我在这里遇到的问题吗?

bandwidthTest_vs2010.log

Build started 2013/11/20 12:24:19.
Environment at start of build:
MSBuildExtensionsPath32 = C:\Program Files (x86)\MSBuild
MSBuildExtensionsPath64 = C:\Program Files\MSBuild
MSBuildExtensionsPath = C:\Program Files (x86)\MSBuild
LOCALAPPDATA = C:\Users\IMI_User\AppData\Local
ALLUSERSPROFILE = C:\ProgramData
APPDATA = C:\Users\IMI_User\AppData\Roaming
BURN_AUTOPLAY = C:\Program Files (x86)\Roxio\OEM\Roxio Burn\
CommonProgramFiles = C:\Program Files (x86)\Common Files
CommonProgramW6432 = C:\Program Files\Common Files
COMPUTERNAME = IMI_USER-PC
ComSpec = C:\Windows\system32\cmd.exe
CUDA_PATH = C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v5.5
CUDA_PATH_V5_5 = C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v5.5
EMC_AUTOPLAY = C:\Program Files (x86)\Common Files\Roxio Shared\OEM\
FP_NO_HOST_CHECK = NO
GNUPLOT_LIB = C:\tmp\gnuplot\demo
HOMEDRIVE = C:
HOMEPATH = \Users\IMI_User
LOGONSERVER = \\IMI_USER-PC
MOZ_PLUGIN_PATH = C:\Program Files (x86)\Foxit Software\Foxit Reader\plugins\
NUMBER_OF_PROCESSORS = 4
NVCUDASAMPLES5_5_ROOT = C:\ProgramData\NVIDIA Corporation\CUDA Samples\v5.5
NVCUDASAMPLES_ROOT = C:\ProgramData\NVIDIA Corporation\CUDA Samples\v5.5
NVTOOLSEXT_PATH = C:\Program Files\NVIDIA Corporation\NvToolsExt\
OS = Windows_NT
Path = C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v5.5\bin;C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v5.5\libnvvp;C:\Program Files\MiKTeX 2.9\miktex\bin\x64\;C:\Program Files\Common Files\Microsoft Shared\Windows Live;C:\Program Files (x86)\Common Files\Microsoft Shared\Windows Live;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Program Files (x86)\Intel\Services\IPT\;C:\Program Files (x86)\NTRU Cryptosystems\NTRU TCG Software Stack\bin\;C:\Program Files\NTRU Cryptosystems\NTRU TCG Software Stack\bin\;C:\Program Files\Dell\Dell Data Protection\Access\Advanced\Wave\Gemalto\Access Client\v5\;C:\Program Files (x86)\Windows Live\Shared;C:\Program Files (x86)\Common Files\Roxio Shared\DLLShared\;C:\Program Files (x86)\Common Files\Roxio Shared\OEM\DLLShared\;C:\Program Files (x86)\Common Files\Roxio Shared\OEM\DLLShared\;C:\Program Files (x86)\Common Files\Roxio Shared\OEM\12.0\DLLShared\;C:\Program Files (x86)\Roxio\OEM\AudioCore\;c:\Program Files (x86)\Microsoft SQL Server\100\Tools\Binn\;c:\Program Files\Microsoft SQL Server\100\Tools\Binn\; C:\Program Files\Microsoft SQL Server\100\DTS\Binn\;C:\Program Files (x86)\MATLAB\R2011b\bin\win32;C:\Program Files (x86)\Common Files\Autodesk Shared\;C:\Program Files\Common Files\Autodesk Shared\;C:\Program Files (x86)\opencv\build\x86\vc10\bin;C:\Program Files (x86)\opencv\build\common\tbb\ia32\vc10;C:\Deploy\bin\Win32\Release;C:\Program Files\MATLAB\R2011b\bin;D:\Research\SQA\CODES\opensmile-2.0-rc1\msvcbuild;C:\Users\IMI_User\AppData\Local\Enthought\Canopy\User\Scripts;C:\Program Files (x86)\Git\cmd;C:\Users\IMI_User\AppData\Local\Enthought\Canopy\User\Scripts;C:\Users\IMI_User\AppData\Local\Enthought\Canopy\User;C:\Users\IMI_User\AppData\Local\Enthought\Canopy\System\Scripts
PATHEXT = .COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH;.MSC
PBRT_SEARCHPATH = C:\pbrt-v1\pbrt-1.05\bin
PROCESSOR_ARCHITECTURE = x86
PROCESSOR_ARCHITEW6432 = AMD64
PROCESSOR_IDENTIFIER = Intel64 Family 6 Model 42 Stepping 7, GenuineIntel
PROCESSOR_LEVEL = 6
PROCESSOR_REVISION = 2a07
ProgramData = C:\ProgramData
ProgramFiles = C:\Program Files (x86)
ProgramW6432 = C:\Program Files
PSModulePath = C:\Windows\system32\WindowsPowerShell\v1.0\Modules\
PUBLIC = C:\Users\Public
RCAUTOPLAY = C:\Program Files (x86)\Roxio\OEM\Roxio Central 5\
SESSIONNAME = Console
SystemDrive = C:
SystemRoot = C:\Windows
TEMP = C:\Users\IMI_User\AppData\Local\Temp
TMP = C:\Users\IMI_User\AppData\Local\TEMP_~1
USERDOMAIN = IMI_User-PC
USERNAME = IMI_User
USERPROFILE = C:\Users\IMI_User
VisualStudioDir = C:\Users\IMI_User\Documents\Visual Studio 2010
VS100COMNTOOLS = c:\Program Files (x86)\Microsoft Visual Studio 10.0\Common7\Tools\
windir = C:\Windows
windows_tracing_flags = 3
windows_tracing_logfile = C:\BVTBin\Tests\installpackage\csilogfile.log

12:24:19.379     1>Project "C:\ProgramData\NVIDIA Corporation\CUDA Samples\v5.5\1_Utilities\bandwidthTest\bandwidthTest_vs2010.vcxproj" on node 2 (rebuild target(s)).
12:24:19.379     1>Building with tools version "4.0".
12:24:19.379     1>Target "_CheckForInvalidConfigurationAndPlatform: (TargetId:2)" in file "c:\Windows\Microsoft.NET\Framework\v4.0.30319\Microsoft.Common.Targets" from project "C:\ProgramData\NVIDIA Corporation\CUDA Samples\v5.5\1_Utilities\bandwidthTest\bandwidthTest_vs2010.vcxproj" (entry point):
                   Task "Error" skipped, due to false condition; ( '$(_InvalidConfigurationError)' == 'true' ) was evaluated as ( '' == 'true' ).
                   Task "Warning" skipped, due to false condition; ( '$(_InvalidConfigurationWarning)' == 'true' ) was evaluated as ( '' == 'true' ).
                   Using "Message" task from assembly "Microsoft.Build.Tasks.v4.0, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a".
                   Task "Message" (TaskId:2)
                     Configuration=Release (TaskId:2)
                   Done executing task "Message". (TaskId:2)
                   Task "Message" (TaskId:3)
                     Platform=x64 (TaskId:3)
                   Done executing task "Message". (TaskId:3)
                   Task "Error" skipped, due to false condition; ('$(OutDir)' != '' and !HasTrailingSlash('$(OutDir)')) was evaluated as ('../../bin/win64/Release/' != '' and !HasTrailingSlash('../../bin/win64/Release/')).
                   Task "Error" skipped, due to false condition; ('$(BaseIntermediateOutputPath)' != '' and !HasTrailingSlash('$(BaseIntermediateOutputPath)')) was evaluated as ('obj\' != '' and !HasTrailingSlash('obj\')).
                   Task "Error" skipped, due to false condition; ('$(IntermediateOutputPath)' != '' and !HasTrailingSlash('$(IntermediateOutputPath)')) was evaluated as ('x64/Release/' != '' and !HasTrailingSlash('x64/Release/')).
12:24:19.400     1>Done building target "_CheckForInvalidConfigurationAndPlatform" in project "bandwidthTest_vs2010.vcxproj".: (TargetId:2)
12:24:19.400     1>Target "_DetermineManagedStateFromCL: (TargetId:3)" in file "C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\Microsoft.CppBuild.targets" from project "C:\ProgramData\NVIDIA Corporation\CUDA Samples\v5.5\1_Utilities\bandwidthTest\bandwidthTest_vs2010.vcxproj" (target "Rebuild" depends on it):
12:24:19.400     1>Done building target "_DetermineManagedStateFromCL" in project "bandwidthTest_vs2010.vcxproj".: (TargetId:3)
12:24:19.400     1>Target "_PrepareForRebuild: (TargetId:4)" in file "C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\Microsoft.BuildSteps.Targets" from project "C:\ProgramData\NVIDIA Corporation\CUDA Samples\v5.5\1_Utilities\bandwidthTest\bandwidthTest_vs2010.vcxproj" (target "Rebuild" depends on it):
12:24:19.401     1>Done building target "_PrepareForRebuild" in project "bandwidthTest_vs2010.vcxproj".: (TargetId:4)
12:24:19.401     1>Target "BeforeRebuild: (TargetId:5)" in file "c:\Windows\Microsoft.NET\Framework\v4.0.30319\Microsoft.Common.Targets" from project "C:\ProgramData\NVIDIA Corporation\CUDA Samples\v5.5\1_Utilities\bandwidthTest\bandwidthTest_vs2010.vcxproj" (target "Rebuild" depends on it):
12:24:19.401     1>Done building target "BeforeRebuild" in project "bandwidthTest_vs2010.vcxproj".: (TargetId:5)
12:24:19.401     1>Target "_PrepareForClean: (TargetId:6)" in file "C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\Microsoft.BuildSteps.Targets" from project "C:\ProgramData\NVIDIA Corporation\CUDA Samples\v5.5\1_Utilities\bandwidthTest\bandwidthTest_vs2010.vcxproj" (target "Clean" depends on it):
                   Task "Delete" skipped, due to false condition; (Exists($(LastBuildState))) was evaluated as (Exists(x64/Release/bandwidthTest.lastbuildstate)).
12:24:19.401     1>Done building target "_PrepareForClean" in project "bandwidthTest_vs2010.vcxproj".: (TargetId:6)
12:24:19.401     1>Target "BeforeClean: (TargetId:7)" in file "c:\Windows\Microsoft.NET\Framework\v4.0.30319\Microsoft.Common.Targets" from project "C:\ProgramData\NVIDIA Corporation\CUDA Samples\v5.5\1_Utilities\bandwidthTest\bandwidthTest_vs2010.vcxproj" (target "Clean" depends on it):
12:24:19.401     1>Done building target "BeforeClean" in project "bandwidthTest_vs2010.vcxproj".: (TargetId:7)
                   Target "UnmanagedUnregistration" skipped, due to false condition; ((('$(_AssemblyTimestampBeforeCompile)' != '$(_AssemblyTimestampAfterCompile)' or '$(RegisterForComInterop)' != 'true' or '$(OutputType)' != 'library') or
                                       ('$(_AssemblyTimestampBeforeCompile)' == '')) and
                                      Exists('@(_UnmanagedRegistrationCache)')) was evaluated as ((('' != '' or '' != 'true' or 'exe' != 'library') or
                                       ('' == '')) and
                                      Exists('obj\bandwidthTest_vs2010.vcxproj.UnmanagedRegistration.cache')).
12:24:19.401     1>Target "CoreClean: (TargetId:8)" in file "c:\Windows\Microsoft.NET\Framework\v4.0.30319\Microsoft.Common.Targets" from project "C:\ProgramData\NVIDIA Corporation\CUDA Samples\v5.5\1_Utilities\bandwidthTest\bandwidthTest_vs2010.vcxproj" (target "Clean" depends on it):
                   Using "Delete" task from assembly "Microsoft.Build.Tasks.v4.0, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a".
                   Task "Delete" (TaskId:4)
                   Done executing task "Delete". (TaskId:4)
                   Using "ReadLinesFromFile" task from assembly "Microsoft.Build.Tasks.v4.0, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a".
                   Task "ReadLinesFromFile" (TaskId:5)
                   Done executing task "ReadLinesFromFile". (TaskId:5)
                   Using "FindUnderPath" task from assembly "Microsoft.Build.Tasks.v4.0, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a".
                   Task "FindUnderPath" (TaskId:6)
                     Comparison path is "../../bin/win64/Release/". (TaskId:6)
                   Done executing task "FindUnderPath". (TaskId:6)
                   Task "FindUnderPath" (TaskId:7)
                     Comparison path is "x64/Release/". (TaskId:7)
                   Done executing task "FindUnderPath". (TaskId:7)
                   Task "Delete" (TaskId:8)
                   Done executing task "Delete". (TaskId:8)
                   Using "RemoveDuplicates" task from assembly "Microsoft.Build.Tasks.v4.0, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a".
                   Task "RemoveDuplicates" (TaskId:9)
                   Done executing task "RemoveDuplicates". (TaskId:9)
                   Using "MakeDir" task from assembly "Microsoft.Build.Tasks.v4.0, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a".
                   Task "MakeDir" (TaskId:10)
                   Done executing task "MakeDir". (TaskId:10)
                   Using "WriteLinesToFile" task from assembly "Microsoft.Build.Tasks.v4.0, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a".
                   Task "WriteLinesToFile" (TaskId:11)
                   Done executing task "WriteLinesToFile". (TaskId:11)
12:24:19.404     1>Done building target "CoreClean" in project "bandwidthTest_vs2010.vcxproj".: (TargetId:8)
                   Target "AssignProjectConfiguration" skipped, due to false condition; ('@(ProjectReference)'!='') was evaluated as (''!='').
12:24:19.404     1>Target "_SplitProjectReferencesByFileExistence: (TargetId:9)" in file "c:\Windows\Microsoft.NET\Framework\v4.0.30319\Microsoft.Common.Targets" from project "C:\ProgramData\NVIDIA Corporation\CUDA Samples\v5.5\1_Utilities\bandwidthTest\bandwidthTest_vs2010.vcxproj" (target "CleanReferencedProjects" depends on it):
                   Task "ResolveNonMSBuildProjectOutput" skipped, due to false condition; ('$(BuildingInsideVisualStudio)'=='true' and '@(ProjectReferenceWithConfiguration)'!='') was evaluated as ('true'=='true' and ''!='').
12:24:19.404     1>Done building target "_SplitProjectReferencesByFileExistence" in project "bandwidthTest_vs2010.vcxproj".: (TargetId:9)
12:24:19.404     1>Target "CleanReferencedProjects: (TargetId:10)" in file "c:\Windows\Microsoft.NET\Framework\v4.0.30319\Microsoft.Common.Targets" from project "C:\ProgramData\NVIDIA Corporation\CUDA Samples\v5.5\1_Utilities\bandwidthTest\bandwidthTest_vs2010.vcxproj" (target "Clean" depends on it):
                   Task "MSBuild" skipped, due to false condition; ('$(BuildingInsideVisualStudio)' != 'true' and '$(BuildProjectReferences)' == 'true' and '@(_MSBuildProjectReferenceExistent)' != '') was evaluated as ('true' != 'true' and 'true' == 'true' and '' != '').
12:24:19.404     1>Done building target "CleanReferencedProjects" in project "bandwidthTest_vs2010.vcxproj".: (TargetId:10)
12:24:19.404     1>Target "CleanPublishFolder: (TargetId:11)" in file "c:\Windows\Microsoft.NET\Framework\v4.0.30319\Microsoft.Common.Targets" from project "C:\ProgramData\NVIDIA Corporation\CUDA Samples\v5.5\1_Utilities\bandwidthTest\bandwidthTest_vs2010.vcxproj" (target "Clean" depends on it):
                   Task "RemoveDir" skipped, due to false condition; ('$(PublishDir)'=='$(OutputPath)app.publish\' and Exists('$(PublishDir)')) was evaluated as ('C:\ProgramData\NVIDIA Corporation\CUDA Samples\v5.5\1_Utilities\bandwidthTest\x64\Release\app.publish\'=='C:\ProgramData\NVIDIA Corporation\CUDA Samples\v5.5\1_Utilities\bandwidthTest\x64\Release\app.publish\' and Exists('C:\ProgramData\NVIDIA Corporation\CUDA Samples\v5.5\1_Utilities\bandwidthTest\x64\Release\app.publish\')).
12:24:19.404     1>Done building target "CleanPublishFolder" in project "bandwidthTest_vs2010.vcxproj".: (TargetId:11)
12:24:19.404     1>Target "AfterClean: (TargetId:12)" in file "c:\Windows\Microsoft.NET\Framework\v4.0.30319\Microsoft.Common.Targets" from project "C:\ProgramData\NVIDIA Corporation\CUDA Samples\v5.5\1_Utilities\bandwidthTest\bandwidthTest_vs2010.vcxproj" (target "Clean" depends on it):
12:24:19.404     1>Done building target "AfterClean" in project "bandwidthTest_vs2010.vcxproj".: (TargetId:12)
                   Target "EntityClean" skipped, due to false condition; ('@(EntityDeploy)' != '') was evaluated as ('' != '').
12:24:19.404     1>Target "BeforeCppClean: (TargetId:13)" in file "C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\Microsoft.CppClean.targets" from project "C:\ProgramData\NVIDIA Corporation\CUDA Samples\v5.5\1_Utilities\bandwidthTest\bandwidthTest_vs2010.vcxproj" (target "CppClean" depends on it):
12:24:19.404     1>Done building target "BeforeCppClean" in project "bandwidthTest_vs2010.vcxproj".: (TargetId:13)
12:24:19.404     1>Target "CoreCppClean: (TargetId:14)" in file "C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\Microsoft.CppClean.targets" from project "C:\ProgramData\NVIDIA Corporation\CUDA Samples\v5.5\1_Utilities\bandwidthTest\bandwidthTest_vs2010.vcxproj" (target "CppClean" depends on it):
                   Task "MakeDir" (TaskId:12)
                   Done executing task "MakeDir". (TaskId:12)
                   Using "CppClean" task from assembly "Microsoft.Build.CppTasks.Common, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a".
                   Task "CppClean" (TaskId:13)
                   Done executing task "CppClean". (TaskId:13)
                   Task "WriteLinesToFile" (TaskId:14)
                   Done executing task "WriteLinesToFile". (TaskId:14)
12:24:19.409     1>Done building target "CoreCppClean" in project "bandwidthTest_vs2010.vcxproj".: (TargetId:14)
12:24:19.409     1>Target "AfterCppClean: (TargetId:15)" in file "C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\Microsoft.CppClean.targets" from project "C:\ProgramData\NVIDIA Corporation\CUDA Samples\v5.5\1_Utilities\bandwidthTest\bandwidthTest_vs2010.vcxproj" (target "CppClean" depends on it):
12:24:19.409     1>Done building target "AfterCppClean" in project "bandwidthTest_vs2010.vcxproj".: (TargetId:15)
12:24:19.409     1>Target "PGInstrumentedClean: (TargetId:16)" in file "C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\Microsoft.CppClean.targets" from project "C:\ProgramData\NVIDIA Corporation\CUDA Samples\v5.5\1_Utilities\bandwidthTest\bandwidthTest_vs2010.vcxproj" (target "CppClean" depends on it):
                   Task "Delete" (TaskId:15)
                   Done executing task "Delete". (TaskId:15)
12:24:19.409     1>Done building target "PGInstrumentedClean" in project "bandwidthTest_vs2010.vcxproj".: (TargetId:16)
12:24:19.409     1>Target "InitializeCudaHostProperties: (TargetId:17)" in file "C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\BuildCustomizations\CUDA 5.5.targets" from project "C:\ProgramData\NVIDIA Corporation\CUDA Samples\v5.5\1_Utilities\bandwidthTest\bandwidthTest_vs2010.vcxproj" (target "AddCudaCompileMetadata" depends on it):
12:24:19.409     1>Done building target "InitializeCudaHostProperties" in project "bandwidthTest_vs2010.vcxproj".: (TargetId:17)
12:24:19.410     1>Target "AddCudaCompileMetadata: (TargetId:18)" in file "C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\BuildCustomizations\CUDA 5.5.targets" from project "C:\ProgramData\NVIDIA Corporation\CUDA Samples\v5.5\1_Utilities\bandwidthTest\bandwidthTest_vs2010.vcxproj" (target "CudaClean" depends on it):
                   Building target "AddCudaCompileMetadata" completely.
                   No input files were specified.
                   Using "SanitizePaths" task from assembly "C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\BuildCustomizations\Nvda.Build.CudaTasks.v5.5.dll".
                   Task "SanitizePaths" (TaskId:16)
                   Done executing task "SanitizePaths". (TaskId:16)
                   Task "ReadLinesFromFile" (TaskId:17)
                   Done executing task "ReadLinesFromFile". (TaskId:17)
                   Using "SplitToItemMetadata" task from assembly "C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\BuildCustomizations\Nvda.Build.CudaTasks.v5.5.dll".
                   Task "SplitToItemMetadata" (TaskId:18)
                   Done executing task "SplitToItemMetadata". (TaskId:18)
12:24:19.422     1>Done building target "AddCudaCompileMetadata" in project "bandwidthTest_vs2010.vcxproj".: (TargetId:18)
12:24:19.422     1>Target "ValidateCudaBuild: (TargetId:19)" in file "C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\BuildCustomizations\CUDA 5.5.targets" from project "C:\ProgramData\NVIDIA Corporation\CUDA Samples\v5.5\1_Utilities\bandwidthTest\bandwidthTest_vs2010.vcxproj" (target "CudaClean" depends on it):
                   Task "Error" skipped, due to false condition; (!Exists($(CudaToolkitDir))) was evaluated as (!Exists(C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v5.5\)).
12:24:19.422     1>Done building target "ValidateCudaBuild" in project "bandwidthTest_vs2010.vcxproj".: (TargetId:19)
12:24:19.422     1>Target "CudaClean: (TargetId:20)" in file "C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\BuildCustomizations\CUDA 5.5.targets" from project "C:\ProgramData\NVIDIA Corporation\CUDA Samples\v5.5\1_Utilities\bandwidthTest\bandwidthTest_vs2010.vcxproj" (target "CppClean" depends on it):
                   Building target "CudaClean" completely.
                   No input files were specified.
                   Initializing task factory "XamlTaskFactory" from assembly "Microsoft.Build.Tasks.v4.0".
                   Using "CudaCompile" task from the task factory "XamlTaskFactory".
                   Task "CudaCompile" (TaskId:19)
                     cmd.exe /C "C:\Users\IMI_User\AppData\Local\Temp;\8f2923f4a8704bedb3b1e52239ac5f64.cmd" (TaskId:19)
                     "C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v5.5\bin\nvcc.exe" -ccbin "c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\bin\x86_amd64"  -I./ -I../../common/inc -I"C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v5.5\include" -I"C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v5.5\include"     --keep-dir x64\Release -maxrregcount=0  --machine 64 --compile  -Xcompiler "/wd 4819"     -DWIN32 -D_MBCS -Xcompiler "/EHsc /W3 /nologo /O2 /Zi  /MT  " -o x64/Release/bandwidthTest.cu.obj "C:\ProgramData\NVIDIA Corporation\CUDA Samples\v5.5\1_Utilities\bandwidthTest\bandwidthTest.cu" -clean (TaskId:19)
                     'C:\Users\IMI_User\AppData\Local\Temp' is not recognized as an internal or external command, (TaskId:19)
                     operable program or batch file. (TaskId:19)
12:24:19.668     1>C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\BuildCustomizations\CUDA 5.5.targets(758,9): error MSB3721: The command ""C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v5.5\bin\nvcc.exe" -ccbin "c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\bin\x86_amd64"  -I./ -I../../common/inc -I"C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v5.5\include" -I"C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v5.5\include"     --keep-dir x64\Release -maxrregcount=0  --machine 64 --compile  -Xcompiler "/wd 4819"     -DWIN32 -D_MBCS -Xcompiler "/EHsc /W3 /nologo /O2 /Zi  /MT  " -o x64/Release/bandwidthTest.cu.obj "C:\ProgramData\NVIDIA Corporation\CUDA Samples\v5.5\1_Utilities\bandwidthTest\bandwidthTest.cu" -clean" exited with code 1.
                   Done executing task "CudaCompile" -- FAILED. (TaskId:19)
12:24:19.669     1>Done building target "CudaClean" in project "bandwidthTest_vs2010.vcxproj" -- FAILED.: (TargetId:20)
12:24:19.669     1>Done Building Project "C:\ProgramData\NVIDIA Corporation\CUDA Samples\v5.5\1_Utilities\bandwidthTest\bandwidthTest_vs2010.vcxproj" (rebuild target(s)) -- FAILED.

Project Performance Summary:
      290 ms  C:\ProgramData\NVIDIA Corporation\CUDA Samples\v5.5\1_Utilities\bandwidthTest\bandwidthTest_vs2010.vcxproj   1 calls
                290 ms  rebuild                                    1 calls

Target Performance Summary:
        0 ms  CleanReferencedProjects                    1 calls
        0 ms  CleanPublishFolder                         1 calls
        0 ms  AfterCppClean                              1 calls
        0 ms  PGInstrumentedClean                        1 calls
        0 ms  ValidateCudaBuild                          1 calls
        0 ms  BeforeCppClean                             1 calls
        0 ms  BeforeClean                                1 calls
        0 ms  _DetermineManagedStateFromCL               1 calls
        0 ms  _SplitProjectReferencesByFileExistence     1 calls
        0 ms  AfterClean                                 1 calls
        0 ms  InitializeCudaHostProperties               1 calls
        0 ms  BeforeRebuild                              1 calls
        0 ms  _PrepareForClean                           1 calls
        1 ms  _PrepareForRebuild                         1 calls
        3 ms  CoreClean                                  1 calls
        5 ms  CoreCppClean                               1 calls
       12 ms  AddCudaCompileMetadata                     1 calls
       21 ms  _CheckForInvalidConfigurationAndPlatform   1 calls
      247 ms  CudaClean                                  1 calls

Task Performance Summary:
        0 ms  RemoveDuplicates                           1 calls
        0 ms  FindUnderPath                              2 calls
        0 ms  MakeDir                                    2 calls
        1 ms  WriteLinesToFile                           2 calls
        2 ms  Delete                                     3 calls
        2 ms  SplitToItemMetadata                        1 calls
        2 ms  CppClean                                   1 calls
        3 ms  ReadLinesFromFile                          2 calls
        3 ms  SanitizePaths                              1 calls
       15 ms  Message                                    2 calls
       45 ms  CudaCompile                                1 calls

Build FAILED.

Time Elapsed 00:00:00.28

1 个答案:

答案 0 :(得分:3)

看起来你有一个&#34 ;;"存储在TEMP环境变量中的路径末尾。这应该被删除,因为TEMP变量只是一个路径,而不是路径列表。修改OS中的TEMP变量后,重新启动Visual Studio。

在Windows 7中,在“开始”按钮搜索字段中键入advanced system settings。在Advanced标签中,点击Environment Variables。点击TEMP中的User variables,然后点击Edit并移除";"从路径的尽头。

修改

我刚刚注意到在日志开头的环境变量列表中没有&#34 ;;"在TEMP路径的末尾,所以这可能不是解决方案。

我们必须了解的最佳线索是:

  

cmd.exe / C" C:\ Users \ IMI_User \ AppData \ Local \ Temp; \ 8f2923f4a8704bedb3b1e52239ac5f64.cmd" (TASKID:19)

";" Temp之后就是破坏构建的东西。