0

I've never programmed GPUs before, but someone gave me this CUDA code to compile. When I tried to do that in VC++ 2008 (CUDA toolkit 3.1), it gives me the following linking error.

LINK : fatal error LNK1181: cannot open input file '.\Release\main.cu.obj'

Any idea what this error means and how to solve it?

EDIT

When I compile the files in the project, main.cu is not being compiled. I get this message

1>"C:\CUDA\bin64\nvcc.exe"  --opencc-options -LIST:source=on  -ccbin "C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\bin"  -D_DEBUG -D_WIN32   -I"C:\CUDA\include" -I"./" -I"../../common/inc" -I"../../../shared/inc"  -Xcompiler "/EHsc /W3 /nologo /Od /Zi   /MDd  " -maxrregcount=64 --ptxas-options=-v -gencode=arch=compute_13,code=\"sm_13,compute_13\"   --compile -o "Debug\main.cu.obj" "c:\Users\jan\Desktop\gpu\gpu\main.cu" 
1>nvcc Hâý(Ç=y░: Visual Studio configuration file '(null)' could not be found for installation at 'C:/Program Files (x86)/Microsoft Visual Studio 9.0/VC/bin/../..'

Why is that so? I followed all the steps given by this site.

MetallicPriest
  • 27,365
  • 43
  • 180
  • 324
  • Is main.cu included in the build? How do you build it? – Bart Mar 02 '12 at 15:12
  • Why not try a command-line build (I've too never programmed CUDA before and spend yesteday just getting rid of MS VC config hell, now being able to compile NVIDIA samples easily with a simple .bat file), look at http://stackoverflow.com/questions/9518403/smallest-possible-complete-set-of-source-and-batch-files-to-build-a-cuda-app-via, if your main goal is to get that working and the project is not too large (to go through all library and source files supplying them to a "hand-crafted" build script). – mlvljr Mar 02 '12 at 15:20
  • 1
    This might be helpful: http://stackoverflow.com/a/2006553/390913 – perreal Mar 02 '12 at 15:22
  • 1
    " except including cutil64d.lib because that doesn't exist in my system." Then build the *amn thing (if anything in it ends up really called within your app). – mlvljr Mar 02 '12 at 15:24
  • Are you sure that everything is set up properly on the VS side to compile using the 64bit compiler? – Bart Mar 02 '12 at 15:34
  • Bart: How do I check if everything is set to compile with 64 bit? – MetallicPriest Mar 02 '12 at 15:37
  • 1
    http://stackoverflow.com/questions/2970493/cuda-linking-error-visual-express-2008-nvcc-fatal-due-to-null-configuratio might be helpful – Bart Mar 02 '12 at 16:14

0 Answers0