bin2c: unrecognized option `--name' Sample builds fail

I can’t build any of the samples in VC++ (Vista x64, VC++ 2008 Pro SP1, CUDA x64 2.3). I added “–verbose” to the custom build step, and the error message in the topic shows at the bottom of the build log, after that “LINK : fatal error LNK1181: cannot open input file ‘.\Debug\template.obj’”:

1>------ Build started: Project: template, Configuration: Debug x64 ------

1>Performing Custom Build Step

1>#$ _SPACE_= 

1>#$ _MODE_=DEVICE

1>#$ _HERE_=C:\Progs\nVidia\CUDA\Toolkit\bin64

1>#$ _THERE_=C:\Progs\nVidia\CUDA\Toolkit\bin64

1>#$ _TARGET_SIZE_=64

1>#$ TOP=C:\Progs\nVidia\CUDA\Toolkit\bin64/..

1>#$ PATH=C:\Progs\nVidia\CUDA\Toolkit\bin64/../extools/bin;C:\Progs\nVidia\CUDA\Toolkit\bin64/../open64/bin;C:\Progs\nVidia\CUDA\Toolkit\bin64/../bin;C:\Progs\nVidia\CUDA\Toolkit\bin64/../lib;C:\Program Files\Microsoft SDKs\Windows\v7.0\Bin;c:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\bin\x86_amd64;c:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\bin;C:\Program Files\Microsoft SDKs\Windows\v6.1\bin;C:\Program Files (x86)\Microsoft Visual Studio 9.0\Common7\Tools\bin;C:\Program Files (x86)\Microsoft Visual Studio 9.0\Common7\tools;C:\Program Files (x86)\Microsoft Visual Studio 9.0\Common7\ide;C:\Program Files (x86)\HTML Help Workshop;C:\Program Files\Microsoft SDKs\Windows\v6.1\bin;C:\Program Files\Microsoft SDKs\Windows\v6.1\lib\win64;C:\Windows\Microsoft.NET\Framework\v2.0.50727;;C:\Progs\Perl64\site\bin;C:\Progs\Perl64\bin;C:\Program Files (x86)\PC Connectivity Solution\;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Program Files\TortoiseSVN\bin;C:\Program Files (x86)\Graphviz2.22\bin;C:\Program Files (x86)\doxygen\bin;C:\Windows\System32\WindowsPowerShell\v1.0\;c:\Program Files (x86)\Microsoft SQL Server0\Tools\binn\;C:\Program Files (x86)\QuickTime\QTSystem\;C:\Program Files (x86)\Smart Projects\IsoBuster;C:\Program Files (x86)\Common Files\Symbian\tools;C:\Program Files (x86)\CSL Arm Toolchain\bin;C:\Progs\Panda3D-1.6.2\python;C:\Progs\Panda3D-1.6.2\bin;C:\Progs\nVidia\CUDA\Toolkit\bin64;C:\Program Files (x86)\Gamutvision\toolbox\matlab;C:\Program Files (x86)\Gamutvision\bin\win32;C:\Program Files (x86)\Gamutvision

1>#$ INCLUDES="-IC:\Progs\nVidia\CUDA\Toolkit\bin64/../include" "-IC:\Progs\nVidia\CUDA\Toolkit\bin64/../include/cudart"  

1>#$ LIBRARIES=  "/LIBPATH:C:\Progs\nVidia\CUDA\Toolkit\bin64/../lib64" cudart.lib

1>#$ CUDAFE_FLAGS=

1>#$ OPENCC_FLAGS=

1>#$ PTXAS_FLAGS=

1>#$ VSINSTALLDIR=c:/Program Files (x86)/Microsoft Visual Studio 9.0/VC/bin/../..

1>#$ VCINSTALLDIR=c:/Program Files (x86)/Microsoft Visual Studio 9.0/VC/bin/../..

1>#$ c:/Program Files (x86)/Microsoft Visual Studio 9.0/VC/bin/amd64/vcvarsamd64.bat

1>c:\Progs\nVidia\CUDA\SDK\C\src\template>call C:\Users\Sven\AppData\Local\Temp/tmpxft_000038fc_00000000-2.bat 

1>Setting environment for using Microsoft Visual Studio 2008 Beta2 x64 tools.

1>c:\Progs\nVidia\CUDA\SDK\C\src\template>set  1>C:\Users\Sven\AppData\Local\Temp/tmpxft_000038fc_00000000-1 

1>#$ Framework35Version=v3.5

1>#$ FrameworkDir=c:\Windows\Microsoft.NET\Framework64

1>#$ FrameworkVersion=v2.0.50727

1>#$ WindowsSdkDir=C:\Program Files\Microsoft SDKs\Windows\v7.0\

1>#$ LIB=c:/Program Files (x86)/Microsoft Visual Studio 9.0/VC/bin/../..\ATLMFC\LIB\amd64;c:/Program Files (x86)/Microsoft Visual Studio 9.0/VC/bin/../..\LIB\amd64;C:\Program Files\Microsoft SDKs\Windows\v7.0\lib\x64;C:\Program Files\Microsoft SDKs\Windows\v7.0\Lib\x64;c:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\lib\amd64;c:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\atlmfc\lib\amd64;C:\Program Files\Microsoft SDKs\Windows\v6.1\lib\x64

1>#$ LIBPATH=c:\Windows\Microsoft.NET\Framework64\v3.5;c:\Windows\Microsoft.NET\Framework64\v2.0.50727;c:\Windows\Microsoft.NET\Framework64\v3.5;c:\Windows\Microsoft.NET\Framework64\v2.0.50727;c:/Program Files (x86)/Microsoft Visual Studio 9.0/VC/bin/../..\ATLMFC\LIB\amd64;c:/Program Files (x86)/Microsoft Visual Studio 9.0/VC/bin/../..\LIB\amd64;C:\Windows\Microsoft.NET\Framework\v2.0.50727;c:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\atlmfc\lib\amd64;c:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\lib\amd64

1>#$ INCLUDE=c:/Program Files (x86)/Microsoft Visual Studio 9.0/VC/bin/../..\ATLMFC\INCLUDE;c:/Program Files (x86)/Microsoft Visual Studio 9.0/VC/bin/../..\INCLUDE;C:\Program Files\Microsoft SDKs\Windows\v7.0\include;C:\Program Files\Microsoft SDKs\Windows\v7.0\Include;C:\Progs\WinDDK100.0.0\inc\wdf\umdf.9;C:\Progs\WinDDK100.0.0\inc\ddk;c:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\include;c:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\atlmfc\include;C:\Program Files\Microsoft SDKs\Windows\v6.1\include;C:\Program Files\Microsoft SDKs\Windows\v6.1\include

1>#$ PATH=c:/Program Files (x86)/Microsoft Visual Studio 9.0/VC/bin/../..\BIN\amd64;c:\Windows\Microsoft.NET\Framework64\v3.5;c:\Windows\Microsoft.NET\Framework64\v3.5\Microsoft .NET Framework 3.5 (Pre-Release Version);c:\Windows\Microsoft.NET\Framework64\v2.0.50727;c:/Program Files (x86)/Microsoft Visual Studio 9.0/VC/bin/../..\VCPackages;c:/Program Files (x86)/Microsoft Visual Studio 9.0/VC/bin/../..\Common7\IDE;c:/Program Files (x86)/Microsoft Visual Studio 9.0/VC/bin/../..\Common7\Tools;c:/Program Files (x86)/Microsoft Visual Studio 9.0/VC/bin/../..\Common7\Tools\bin;C:\Program Files\Microsoft SDKs\Windows\v7.0\bin\x64;C:\Program Files\Microsoft SDKs\Windows\v7.0\bin\win64\x64;C:\Program Files\Microsoft SDKs\Windows\v7.0\bin;C:\Progs\nVidia\CUDA\Toolkit\bin64/../extools/bin;C:\Progs\nVidia\CUDA\Toolkit\bin64/../open64/bin;C:\Progs\nVidia\CUDA\Toolkit\bin64/../bin;C:\Progs\nVidia\CUDA\Toolkit\bin64/../lib;C:\Program Files\Microsoft SDKs\Windows\v7.0\Bin;c:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\bin\x86_amd64;c:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\bin;C:\Program Files\Microsoft SDKs\Windows\v6.1\bin;C:\Program Files (x86)\Microsoft Visual Studio 9.0\Common7\Tools\bin;C:\Program Files (x86)\Microsoft Visual Studio 9.0\Common7\tools;C:\Program Files (x86)\Microsoft Visual Studio 9.0\Common7\ide;C:\Program Files (x86)\HTML Help Workshop;C:\Program Files\Microsoft SDKs\Windows\v6.1\bin;C:\Program Files\Microsoft SDKs\Windows\v6.1\lib\win64;C:\Windows\Microsoft.NET\Framework\v2.0.50727;;C:\Progs\Perl64\site\bin;C:\Progs\Perl64\bin;C:\Program Files (x86)\PC Connectivity Solution\;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Program Files\TortoiseSVN\bin;C:\Program Files (x86)\Graphviz2.22\bin;C:\Program Files (x86)\doxygen\bin;C:\Windows\System32\WindowsPowerShell\v1.0\;c:\Program Files (x86)\Microsoft SQL Server0\Tools\binn\;C:\Program Files (x86)\QuickTime\QTSystem\;C:\Program Files (x86)\Smart Projects\IsoBuster;C:\Program Files (x86)\Common Files\Symbian\tools;C:\Program Files (x86)\CSL Arm Toolchain\bin;C:\Progs\Panda3D-1.6.2\python;C:\Progs\Panda3D-1.6.2\bin;C:\Progs\nVidia\CUDA\Toolkit\bin64;C:\Program Files (x86)\Gamutvision\toolbox\matlab;C:\Program Files (x86)\Gamutvision\bin\win32;C:\Program Files (x86)\Gamutvision

1>#$ PATH=c:/Program Files (x86)/Microsoft Visual Studio 9.0/VC/bin/amd64;c:/Program Files (x86)/Microsoft Visual Studio 9.0/VC/bin/../..\BIN\amd64;c:\Windows\Microsoft.NET\Framework64\v3.5;c:\Windows\Microsoft.NET\Framework64\v3.5\Microsoft .NET Framework 3.5 (Pre-Release Version);c:\Windows\Microsoft.NET\Framework64\v2.0.50727;c:/Program Files (x86)/Microsoft Visual Studio 9.0/VC/bin/../..\VCPackages;c:/Program Files (x86)/Microsoft Visual Studio 9.0/VC/bin/../..\Common7\IDE;c:/Program Files (x86)/Microsoft Visual Studio 9.0/VC/bin/../..\Common7\Tools;c:/Program Files (x86)/Microsoft Visual Studio 9.0/VC/bin/../..\Common7\Tools\bin;C:\Program Files\Microsoft SDKs\Windows\v7.0\bin\x64;C:\Program Files\Microsoft SDKs\Windows\v7.0\bin\win64\x64;C:\Program Files\Microsoft SDKs\Windows\v7.0\bin;C:\Progs\nVidia\CUDA\Toolkit\bin64/../extools/bin;C:\Progs\nVidia\CUDA\Toolkit\bin64/../open64/bin;C:\Progs\nVidia\CUDA\Toolkit\bin64/../bin;C:\Progs\nVidia\CUDA\Toolkit\bin64/../lib;C:\Program Files\Microsoft SDKs\Windows\v7.0\Bin;c:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\bin\x86_amd64;c:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\bin;C:\Program Files\Microsoft SDKs\Windows\v6.1\bin;C:\Program Files (x86)\Microsoft Visual Studio 9.0\Common7\Tools\bin;C:\Program Files (x86)\Microsoft Visual Studio 9.0\Common7\tools;C:\Program Files (x86)\Microsoft Visual Studio 9.0\Common7\ide;C:\Program Files (x86)\HTML Help Workshop;C:\Program Files\Microsoft SDKs\Windows\v6.1\bin;C:\Program Files\Microsoft SDKs\Windows\v6.1\lib\win64;C:\Windows\Microsoft.NET\Framework\v2.0.50727;;C:\Progs\Perl64\site\bin;C:\Progs\Perl64\bin;C:\Program Files (x86)\PC Connectivity Solution\;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Program Files\TortoiseSVN\bin;C:\Program Files (x86)\Graphviz2.22\bin;C:\Program Files (x86)\doxygen\bin;C:\Windows\System32\WindowsPowerShell\v1.0\;c:\Program Files (x86)\Microsoft SQL Server0\Tools\binn\;C:\Program Files (x86)\QuickTime\QTSystem\;C:\Program Files (x86)\Smart Projects\IsoBuster;C:\Program Files (x86)\Common Files\Symbian\tools;C:\Program Files (x86)\CSL Arm Toolchain\bin;C:\Progs\Panda3D-1.6.2\python;C:\Progs\Panda3D-1.6.2\bin;C:\Progs\nVidia\CUDA\Toolkit\bin64;C:\Program Files (x86)\Gamutvision\toolbox\matlab;C:\Program Files (x86)\Gamutvision\bin\win32;C:\Program Files (x86)\Gamutvision

1>#$ cl -D__CUDA_ARCH__=100 -nologo -E -TP -DCUDA_NO_SM_12_ATOMIC_INTRINSICS -DCUDA_NO_SM_13_DOUBLE_INTRINSICS -DCUDA_FLOAT_MATH_FUNCTIONS -DCUDA_NO_SM_11_ATOMIC_INTRINSICS  "-IC:\Progs\nVidia\CUDA\Toolkit\bin64/../include" "-IC:\Progs\nVidia\CUDA\Toolkit\bin64/../include/cudart"   -I. -D__CUDACC__ -C  /EHsc /W3 /nologo /Wp64 /Od /Zi /RTC1 /MTd -I "C:/Progs/nVidia/CUDA/Toolkit/include" -I "./" -I "../../common/inc" -D "_DEBUG" -D "WIN32" -D "_CONSOLE" -D "_MBCS" -FI "cuda_runtime.h" > "C:\Users\Sven\AppData\Local\Temp/tmpxft_000038fc_00000000-6_template.cpp1.ii" "template.cu" 

1>cl : Command line warning D9035 : option 'Wp64' has been deprecated and will be removed in a future release

1>template.cu

1>#$ cudafe --m64 --microsoft_version=1500 --msvc_target_version=1500 --compiler_bindir "c:/Program Files (x86)/Microsoft Visual Studio 9.0/VC/bin/../.." --sdk_dir "C:/Program Files/Microsoft SDKs/Windows/v7.0/" --diag_error=host_device_limited_call --diag_error=ms_asm_decl_not_allowed -tused --gen_c_file_name "C:\Users\Sven\AppData\Local\Temp/tmpxft_000038fc_00000000-3_template.cudafe1.c" --stub_file_name "C:\Users\Sven\AppData\Local\Temp/tmpxft_000038fc_00000000-3_template.cudafe1.stub.c" --stub_header_file_name "C:\Users\Sven\AppData\Local\Temp/tmpxft_000038fc_00000000-3_template.cudafe1.stub.h" --gen_device_file_name "C:\Users\Sven\AppData\Local\Temp/tmpxft_000038fc_00000000-3_template.cudafe1.gpu" --include_file_name "C:\Users\Sven\AppData\Local\Temp/tmpxft_000038fc_00000000-5_template.fatbin.c" "C:\Users\Sven\AppData\Local\Temp/tmpxft_000038fc_00000000-6_template.cpp1.ii" 

1>#$ cl -D__CUDA_ARCH__=100 -nologo -E -TC -DCUDA_NO_SM_12_ATOMIC_INTRINSICS -DCUDA_NO_SM_13_DOUBLE_INTRINSICS -DCUDA_FLOAT_MATH_FUNCTIONS -DCUDA_NO_SM_11_ATOMIC_INTRINSICS  "-IC:\Progs\nVidia\CUDA\Toolkit\bin64/../include" "-IC:\Progs\nVidia\CUDA\Toolkit\bin64/../include/cudart"   -I. -D__CUDACC__ -C  /EHsc /W3 /nologo /Wp64 /Od /Zi /RTC1 /MTd -I "C:/Progs/nVidia/CUDA/Toolkit/include" -I "./" -I "../../common/inc" > "C:\Users\Sven\AppData\Local\Temp/tmpxft_000038fc_00000000-7_template.cpp2.i" "C:\Users\Sven\AppData\Local\Temp/tmpxft_000038fc_00000000-3_template.cudafe1.gpu" 

1>cl : Command line warning D9035 : option 'Wp64' has been deprecated and will be removed in a future release

1>tmpxft_000038fc_00000000-3_template.cudafe1.gpu

1>#$ cudafe --m64 --microsoft_version=1500 --msvc_target_version=1500 --compiler_bindir "c:/Program Files (x86)/Microsoft Visual Studio 9.0/VC/bin/../.." --sdk_dir "C:/Program Files/Microsoft SDKs/Windows/v7.0/" --c --gen_c_file_name "C:\Users\Sven\AppData\Local\Temp/tmpxft_000038fc_00000000-8_template.cudafe2.c" --stub_file_name "C:\Users\Sven\AppData\Local\Temp/tmpxft_000038fc_00000000-8_template.cudafe2.stub.c" --stub_header_file_name "C:\Users\Sven\AppData\Local\Temp/tmpxft_000038fc_00000000-8_template.cudafe2.stub.h" --gen_device_file_name "C:\Users\Sven\AppData\Local\Temp/tmpxft_000038fc_00000000-8_template.cudafe2.gpu" --include_file_name "C:\Users\Sven\AppData\Local\Temp/tmpxft_000038fc_00000000-5_template.fatbin.c" "C:\Users\Sven\AppData\Local\Temp/tmpxft_000038fc_00000000-7_template.cpp2.i" 

1>#$ cl -D__CUDA_ARCH__=100 -nologo -E -TC -DCUDA_NO_SM_12_ATOMIC_INTRINSICS -DCUDA_NO_SM_13_DOUBLE_INTRINSICS -DCUDA_FLOAT_MATH_FUNCTIONS -DCUDA_NO_SM_11_ATOMIC_INTRINSICS  "-IC:\Progs\nVidia\CUDA\Toolkit\bin64/../include" "-IC:\Progs\nVidia\CUDA\Toolkit\bin64/../include/cudart"   -I. -D__GNUC__ -D__CUDABE__  /EHsc /W3 /nologo /Wp64 /Od /Zi /RTC1 /MTd -I "C:/Progs/nVidia/CUDA/Toolkit/include" -I "./" -I "../../common/inc" > "C:\Users\Sven\AppData\Local\Temp/tmpxft_000038fc_00000000-9_template.cpp3.i" "C:\Users\Sven\AppData\Local\Temp/tmpxft_000038fc_00000000-8_template.cudafe2.gpu" 

1>cl : Command line warning D9035 : option 'Wp64' has been deprecated and will be removed in a future release

1>tmpxft_000038fc_00000000-8_template.cudafe2.gpu

1>#$ filehash -s "" "C:\Users\Sven\AppData\Local\Temp/tmpxft_000038fc_00000000-9_template.cpp3.i" > "C:\Users\Sven\AppData\Local\Temp/tmpxft_000038fc_00000000-10_template.hash"

1>#$ nvopencc  -TARG:compute_10 -m64 "C:\Users\Sven\AppData\Local\Temp/tmpxft_000038fc_00000000-9_template.cpp3.i"  -o "C:\Users\Sven\AppData\Local\Temp/tmpxft_000038fc_00000000-4_template.ptx"

1>#$ ptxas --key="f44d9738eba800bb"  -arch=sm_10 "C:\Users\Sven\AppData\Local\Temp/tmpxft_000038fc_00000000-4_template.ptx"  -o "C:\Users\Sven\AppData\Local\Temp/tmpxft_000038fc_00000000-11_template.sm_10.cubin" 

1>#$ fatbin --key="f44d9738eba800bb" --source-name="template.cu" --usage-mode="" --embedded-fatbin="C:\Users\Sven\AppData\Local\Temp/tmpxft_000038fc_00000000-5_template.fatbin.c" "--image=profile=compute_10,file=C:\Users\Sven\AppData\Local\Temp/tmpxft_000038fc_00000000-4_template.ptx" "--image=profile=sm_10,file=C:\Users\Sven\AppData\Local\Temp/tmpxft_000038fc_00000000-11_template.sm_10.cubin" 

1>bin2c: unrecognized option `--name'

1>Usage:

1>  bin2c input output.c

1>  bin2c input -o output.c

1>  bin2c input >output.c

1># --error 0xffffffff --

1>Linking...

1>LINK : fatal error LNK1181: cannot open input file '.\Debug\template.obj'

1>Build log was saved at "file://c:\Progs\nVidia\CUDA\SDK\C\src\template\x64\Debug\BuildLog.htm"

1>template - 1 error(s), 3 warning(s)

========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========

With CUDA x64 2.2, it works.

I don’t know if this will help, but I had at least part of your error show up and it went away when I added the latest build rule for 2.3. This is with win xp x64 though…