title: Visual Studio 2012 with CUDA 5.5 - CUDA syntax & definitions not recognized
body: <p>for a lab we're suppose to work on I need to set up Cuda with Visual Studio 2012 and run some tests. What I've done:</p>
  
  <ul>
  <li>Install Cuda 5.5 + Edit build configurations.</li>
  <li>Visual Studio 2012 is installed.</li>
  <li>In the project, right click -> Build Configurations and choose Cuda 5.5</li>
  <li>Project -> Properties -> VC++ directories: Set include/lib directories from Cuda directory.</li>
  </ul>
  
  <p>Now, I was under the impression that after doing all this I should have no need to put "#include cudafiles" in my classes, they should be automatically imported, no?</p>
  
  <p>I'm not getting the following as undefined:</p>
  
  <ul>
  <li>cudaFree</li>
  <li>cudaError</li>
  <li>HANDLE_NULL</li>
  </ul>
  
  <p>The following as 'device is not a type name'</p>
  
  <p><code>__device__</code>    </p>
  
  <p>And <code>__global__</code> has no storage class or identifier. </p>
  
  <p>I've spent hours and hours and hours trying to get this to work, following tutorials online, but I just can't get it to run properly. The code I'm using can be found here:</p>
  
  <p><a href="https://bitbucket.org/mrfright/cuda_by_example/src/bd759a6527ffa1b88420fc09acbc52f88c0587d2/appendix_a/?at=default" rel="nofollow">https://bitbucket.org/mrfright/cuda_by_example/src/bd759a6527ffa1b88420fc09acbc52f88c0587d2/appendix_a/?at=default</a></p>
  
  <p>You can see in those files only 'lock.h' and 'book.h' are being included. I am including both of those.</p>
  
  <p>Also, I am very new to C and VS so I may be leaving out a lot of important info.. please advice me to anything you may need to help assess this!! Thanks!</p>