Cuda error (VS2005, CUDA 2.0)

Ok, CUDA was working fine for the last few weeks, then yesterday I started to get LNK1181 errors, by which the compiler does not create the object file of the cuda file, ‘sample.cu’, however it does create the object files for the other C++ files i have in the project.

I cannot upgrade to CUDA 2.1 and VS 2008 as my graphics card cannot run the new Beta 180.60 drivers.

It is strange as it shows below it does create the .obj file, but then cannot find it later on in the build process (I’m not that good at understanding the whole build/link process!) External Image

Thanks for your help in advance! Remember I have had CUDA working before, so its not a platform issue. I’ve tried re-installing the SDK, toolkit and VS2005, but it doesn’t help!

EDIT: If I clean the project and compile one of the C++ files separately, it creates the object file. However, it does not create the object file for the cuda file! It DOES however create the object file if I build the project in EmuDebug mode. I am using the Release mode at the moment.

Here is my build log:

Build Log

Rebuild started: Project: Thom, Configuration: Release|Win32

Command Lines

Creating temporary file “c:\Program Files\NVIDIA Corporation\NVIDIA CUDA SDK\projects\Thom\Thom\Release\BAT00006D42364224.bat” with contents
[
@echo off

nvcc.exe -ccbin “C:\Program Files\Microsoft Visual Studio 8\VC\bin” -c -D_CONSOLE -Xcompiler “/EHsc /W3 /nologo /Wp64 /O2 /Zi /MT " -I"C:\CUDA\include” -I"C:\ProgramData\NVIDIA Corporation\NVIDIA CUDA SDK\common\inc" -o Release\sample.obj sample.cu

if errorlevel 1 goto VCReportError

goto VCEnd

:VCReportError

echo Project : error PRJ0019: A tool returned an error code from “Compiling…”

exit 1

:VCEnd
]
Creating command line “”“c:\Program Files\NVIDIA Corporation\NVIDIA CUDA SDK\projects\Thom\Thom\Release\BAT00006D42364224.bat”“”
Creating temporary file “c:\Program Files\NVIDIA Corporation\NVIDIA CUDA SDK\projects\Thom\Thom\Release\RSP00006E42364224.rsp” with contents
[
/O2 /GL /D “WIN32” /D “NDEBUG” /D “_CONSOLE” /D “_MBCS” /FD /EHsc /MT /Fo"Release\" /Fd"Release\vc80.pdb" /W3 /c /Wp64 /Zi /TP “.\schuster.cpp”

“.\SDLbegin.cpp”
]
Creating command line “cl.exe @“c:\Program Files\NVIDIA Corporation\NVIDIA CUDA SDK\projects\Thom\Thom\Release\RSP00006E42364224.rsp” /nologo /errorReport:prompt”
Creating temporary file “c:\Program Files\NVIDIA Corporation\NVIDIA CUDA SDK\projects\Thom\Thom\Release\RSP00006F42364224.rsp” with contents
[
/OUT:“C:\Program Files\NVIDIA Corporation\NVIDIA CUDA SDK\projects\Thom\Release\Thom.exe” /INCREMENTAL:NO /LIBPATH:“C:\CUDA\lib” /LIBPATH:“C:\ProgramData\NVIDIA Corporation\NVIDIA CUDA SDK\common\lib” /MANIFEST /MANIFESTFILE:“Release\Thom.exe.intermediate.manifest” /DEBUG /PDB:“c:\Program Files\NVIDIA Corporation\NVIDIA CUDA SDK\projects\Thom\release\Thom.pdb” /SUBSYSTEM:CONSOLE /OPT:REF /OPT:ICF /LTCG /MACHINE:X86 SDL.lib SDLmain.lib cudart.lib cutil32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib

“.\Release\sample.obj”

“.\Release\SDLbegin.obj”

“.\Release\schuster.obj”
]
Creating command line “link.exe @“c:\Program Files\NVIDIA Corporation\NVIDIA CUDA SDK\projects\Thom\Thom\Release\RSP00006F42364224.rsp” /NOLOGO /ERRORREPORT:PROMPT”

Output Window

Compiling…
sample.cu
sample.cu(53): warning: variable “vReco” was declared but never referenced
sample.cu(54): warning: variable “vExci” was declared but never referenced
sample.cu(55): warning: variable “k0Reco” was declared but never referenced
sample.cu(56): warning: variable “k0Exci” was declared but never referenced
sample.cu(66): warning: variable “realZ” was declared but never referenced
sample.cu(173): warning: variable “a_d” is used before its value is set
sample.cu(174): warning: variable “a_d2” is used before its value is set
sample.cu(130): warning: variable “timer” was declared but never referenced
sample.cu(135): warning: variable “N2” was declared but never referenced
sample.cu(136): warning: variable “radius” was declared but never referenced
sample.cu(137): warning: variable “arraySize” was declared but never referenced
sample.cu(138): warning: variable “slotSize” was declared but never referenced
sample.cu(140): warning: variable “size” was declared but never referenced
sample.cu(141): warning: variable “size2” was declared but never referenced
sample.cu(142): warning: variable “sharedMemSize” was declared but never referenced
tmpxft_000011bc_00000000-3_sample.cudafe1.gpu
tmpxft_000011bc_00000000-8_sample.cudafe2.gpu
C:\Users\STRRET~1\AppData\Local\Temp/tmpxft_000011bc_00000000-9_sample.cpp3.i(0): Error: Const space overflowed
Compiling…
schuster.cpp
.\schuster.cpp(33) : warning C4305: ‘initializing’ : truncation from ‘double’ to ‘float’
SDLbegin.cpp
Linking…
LINK : fatal error LNK1181: cannot open input file ‘.\Release\sample.obj’

Results

Build log was saved at “file://c:\Program Files\NVIDIA Corporation\NVIDIA CUDA SDK\projects\Thom\Thom\Release\BuildLog.htm”
Thom - 1 error(s), 16 warning(s)