新手求教,包含iostream编译出错
第一次装CUDA(6.0),VS 2012上带的那个模版能正常运行,但是一包含iostream就编译出错。
从网上找的代码也是这样,有include <iostream>就编译出错。
1>
1>D:\应用软件\VS 2012\VC\include\xstring(251): warning : controlling expression is constant
1>
1>D:\应用软件\VS 2012\VC\include\ostream(65): error : too few arguments in function call
1>
1>D:\应用软件\VS 2012\VC\include\istream(48): error : too few arguments in function call
1>
1>D:\应用软件\VS 2012\VC\include\istream(949): error : too few arguments in function call
1>
1>D:/CAFFE PROJECT/ZYQ1/ZYQ1/kernel.cu(10): warning : variable "response" was declared but never referenced
1>
1>D:\应用软件\VS 2012\VC\include\xatomic0.h(76): warning : extern inline function "std::_Atomic_load_4" was referenced but not defined
1>
1>D:\应用软件\VS 2012\VC\include\xatomic0.h(77): warning : extern inline function "std::_Atomic_compare_exchange_weak_4" was referenced but not defined
1>
1>D:\应用软件\VS 2012\VC\include\xatomic0.h(79): warning : extern inline function "std::_Atomic_fetch_add_4" was referenced but not defined
1>
1>D:\应用软件\VS 2012\VC\include\xatomic0.h(81): warning : extern inline function "std::_Atomic_fetch_sub_4" was referenced but not defined
1>
1> 3 errors detected in the compilation of "C:/Users/ZHANGY~1/AppData/Local/Temp/tmpxft_00001820_00000000-3_kernel.cpp4.ii".
1> kernel.cu
1>C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V110\BuildCustomizations\CUDA 6.0.targets(597,9): error MSB3721: 命令“"D:\cuda\toolkit\bin\nvcc.exe" -gencode=arch=compute_10,code=\"sm_10,compute_10\" --use-local-env --cl-version 2012 -ccbin "D:\应用软件\VS 2012\VC\bin" -ID:\cuda\toolkit\include -ID:\cuda\toolkit\include -G --keep-dir Debug -maxrregcount=0 --machine 32 --compile -cudart static -g -DWIN32 -D_DEBUG -D_CONSOLE -D_MBCS -Xcompiler "/EHsc /W3 /nologo /Od /Zi /RTC1 /MDd " -o Debug\kernel.cu.obj "D:\CAFFE PROJECT\ZYQ1\ZYQ1\kernel.cu"”已退出,返回代码为 2。
求教各位大神,应该怎么解决?