title: CUDA not working in 64 bit windows 7
body: <p>I have cuda toolkit 4.0 installed in a 64 bit windows 7. I try building my cuda code,</p>
  
  <pre><code>#include&lt;iostream&gt;
  #include"cuda_runtime.h"
  #include"cuda.h"
  __global__ void kernel(){
  } 
  int main(){
  kernel&lt;&lt;&lt;1,1&gt;&gt;&gt;();
  int c = 0;
  cudaGetDeviceCount(&amp;c);
  cudaDeviceProp prop;
  cudaGetDeviceProperties(&amp;prop, 0);
  std::cout&lt;&lt;"the name is"&lt;&lt;prop.name;
  std::cout&lt;&lt;"Hello World!"&lt;&lt;c&lt;&lt;std::endl;
  system("pause");
  return 0;
  }
  </code></pre>
  
  <p>but operation fails. Below is the build log:</p>
  
  <p>Build Log      Rebuild started: Project: god, Configuration: Debug|Win32
  Command Lines      Creating temporary file "c:\Users\t-sudhk\Documents\Visual Studio 2008\Projects\god\god\Debug\BAT0000482007500.bat" with contents
  [
  @echo off</p>
  
  <p>echo "C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v4.0\bin\nvcc.exe"    -gencode=arch=compute_10,code=\"sm_10,compute_10\" -gencode=arch=compute_20,code=\"sm_20,compute_20\"  --machine 32 -ccbin "C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\bin"    -Xcompiler "/EHsc /W3 /nologo /O2 /Zi   /MT  "  -I"C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v4.0\include" -maxrregcount=0  --compile -o "Debug/sample.cu.obj" sample.cu </p>
  
  <p>"C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v4.0\bin\nvcc.exe"    -gencode=arch=compute_10,code=\"sm_10,compute_10\" -gencode=arch=compute_20,code=\"sm_20,compute_20\"  --machine 32 -ccbin "C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\bin"    -Xcompiler "/EHsc /W3 /nologo /O2 /Zi   /MT  "  -I"C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v4.0\include" -maxrregcount=0  --compile -o "Debug/sample.cu.obj" "c:\Users\t-sudhk\Documents\Visual Studio 2008\Projects\god\god\sample.cu" </p>
  
  <p>if errorlevel 1 goto VCReportError</p>
  
  <p>goto VCEnd</p>
  
  <p>:VCReportError</p>
  
  <p>echo Project : error PRJ0019: A tool returned an error code from "Compiling with CUDA Build Rule..."</p>
  
  <p>exit 1</p>
  
  <p>:VCEnd
  ]
  Creating command line """c:\Users\t-sudhk\Documents\Visual Studio 2008\Projects\god\god\Debug\BAT0000482007500.bat"""
  Creating temporary file "c:\Users\t-sudhk\Documents\Visual Studio 2008\Projects\god\god\Debug\RSP0000492007500.rsp" with contents
  [
  /OUT:"C:\Users\t-sudhk\Documents\Visual Studio 2008\Projects\god\Debug\god.exe" /LIBPATH:"C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v4.0\lib\x64" /MANIFEST /MANIFESTFILE:"Debug\god.exe.intermediate.manifest" /MANIFESTUAC:"level='asInvoker' uiAccess='false'" /DEBUG /PDB:"C:\Users\t-sudhk\Documents\Visual Studio 2008\Projects\god\Debug\god.pdb" /DYNAMICBASE /NXCOMPAT /MACHINE:X86 cudart.lib cuda.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</p>
  
  <p>".\Debug\sample.cu.obj"
  ]
  Creating command line "link.exe @"c:\Users\t-sudhk\Documents\Visual Studio 2008\Projects\god\god\Debug\RSP0000492007500.rsp" /NOLOGO /ERRORREPORT:PROMPT"
   Output Window      Compiling with CUDA Build Rule...
  "C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v4.0\bin\nvcc.exe"    -gencode=arch=compute_10,code=\"sm_10,compute_10\" -gencode=arch=compute_20,code=\"sm_20,compute_20\"  --machine 32 -ccbin "C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\bin"    -Xcompiler "/EHsc /W3 /nologo /O2 /Zi   /MT  "  -I"C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v4.0\include" -maxrregcount=0  --compile -o "Debug/sample.cu.obj" sample.cu 
  sample.cu
  sample.cu.obj : error LNK2019: unresolved external symbol _cudaLaunch@4 referenced in function "enum cudaError <strong>cdecl cudaLaunch(char *)" (??$cudaLaunch@D@@YA?AW4cudaError@@PAD@Z)
  sample.cu.obj : error LNK2019: unresolved external symbol ___cudaRegisterFunction@40 referenced in function "void __cdecl _<em>sti</em></strong>_cudaRegisterAll_52_tmpxft_00001c68_00000000_8_sample_compute_10_cpp1_ii_b81a68a1(void)" (?<strong>sti_</strong>_cudaRegisterAll_52_tmpxft_00001c68_00000000_8_sample_compute_10_cpp1_ii_b81a68a1@@YAXXZ)
  sample.cu.obj : error LNK2019: unresolved external symbol <strong>_cudaRegisterFatBinary@4 referenced in function "void __cdecl _<em>sti</em></strong>_cudaRegisterAll_52_tmpxft_00001c68_00000000_8_sample_compute_10_cpp1_ii_b81a68a1(void)" (?<strong>sti_</strong>_cudaRegisterAll_52_tmpxft_00001c68_00000000_8_sample_compute_10_cpp1_ii_b81a68a1@@YAXXZ)
  sample.cu.obj : error LNK2019: unresolved external symbol _cudaGetDeviceProperties@8 referenced in function _main
  sample.cu.obj : error LNK2019: unresolved external symbol _cudaGetDeviceCount@4 referenced in function _main
  sample.cu.obj : error LNK2019: unresolved external symbol _cudaConfigureCall@32 referenced in function _main
  C:\Users\t-sudhk\Documents\Visual Studio 2008\Projects\god\Debug\god.exe : fatal error LNK1120: 7 unresolved externals
   Results      Build log was saved at "file://c:\Users\t-sudhk\Documents\Visual Studio 2008\Projects\god\god\Debug\BuildLog.htm"
  god - 8 error(s), 0 warning(s)</p>
  
  <p>I will be highly obliged if someone could help me. Thanks</p>