The project I was attempting to compile was a VS2010 project I had created from scratch. The code was test code I downloaded from the internet. I actually had two problems …
1st problem:
Under ‘build customization’ you need to select the CUDA version to build with. I had selected the highest version shown which was ‘CUDA 4.2(.targets,.props)’. The problem was that I linked to CUDA version 5.0. When I say ‘linked’ I am referring to the linked option which you can find in the VS2010 menu bar at “Project => Properties =>Configuration properties => Linker”. When you get to this menu you have the option to add ‘Additional Library Directories’. I had linked to CUDA version 5.0. I have not figured out yet why I do not have a CUDA v5.0 under ‘build customization’ … but that is another question for another day.
Lesson: whatever version of cude you link to (in Linker menu), is the version you should select in the 'build customation' menu.
2nd problem:
I am running on Windows 7 (64 bit), Processor is 64 bit (Intel quad core), the CUDA sdk/toolkit I downloaded was 64 bit, but I was attempting to debug with a Win32 platform. Yes, I knew I needed to compile/build using the proper bit platform, but ignorantly, I could not figure out how to change the ‘Platform’ (located in the 'configuration manager' menu for your VS project) to x64. The how-tos on the web showed the x64 option as already being available in the ‘Platform’ dropdown. I read later articles that stated that VS can only debug in Win32 but can compile in Win32 or x64 (not true) which freaked me out even more. In Reality, If it is your first time to use x64 Platform, the x64 option will NOT be in the Platform dropdown. You must create a ‘new’ platform. When you do this, you need to select x64 for the ‘Copy settings from:’ dropdown. I want to say I tried this before and there was not x64 option in the ‘Copy settings form:’ dropdown. I either overlooked the x64 ‘Copy setting from:’ option previously … or this option was added after I conducted the custom install suggested by Roger (I wish I could remember/ was more observant about this). Lesson: may need to 'create new' platform in the 'configuration manager' menu if it is your first time to use x64 option (believe VS debug may default to Win32 ... but is easily changed to x64 if needed).
Anyway, after fixing both of these things (not just one … but both), the CUDA code did successfully compile. I just wanted to thank everyone again for all the help! Got me moving in the correct direction!
PS: Nice tutorial (not mine but I used to help me) to help you compile your first CUDA code http://www.youtube.com/watch?v=1HMVg40fsg0