How to create 64-bit CUDA applications? (Win 7 x64, CUDA 4.0, VS Express 2010)
I'm mostly set up for CUDA development. I've installed the developer drivers, CUDA 4.0 toolkit, and the 4.0 SDK, as well as the bugfix. I'm running Windows 7 x64, and am using Visual C++ 2010 Express. For 32-bit applications, I perform the following steps and my CUDA applications work properly.

- Create new empty project
- make sure Platform Toolset is set to v100 (normally the default)
- check the CUDA 4.0 Build Customization for the project
- set the item type of my .cu file to CUDA C/C++
- add 'cudart.lib' to Properties->Linker->Input->Additional Dependencies

I can also run non-CUDA 64-bit applications. Visual C++ 2010 Express does not come with 64-bit dependencies automatically, so I had to install the Windows 7.1 SDK w/ .NET Framework 4.0. Then I simply set the Platform Toolset for the VC++ project to Windows7.1SDK, change the Active solution platform to x64, and I'm good to go.

However, I can't seem to do both at the same time - I can't create a 64-bit CUDA application. If I change the Platform Toolset of a CUDA application to Windows7.1SDK, whether the Active solution platform is x64 or Win32, I get the compile error that nvcc.exe exited with code -1. And if I leave the Platform Toolset set to v100 and change the Active solution platform to x64, I get the compile error "fatal error LNK1104: cannot open file 'kernel32.lib'. The only combination that works is v100 and Win32, and obviously that prevents me from running a 64-bit application.

Is there a procedure for enabling this functionality that I just haven't been able to find online? Any ideas or suggestions? Thanks for your time.
I'm mostly set up for CUDA development. I've installed the developer drivers, CUDA 4.0 toolkit, and the 4.0 SDK, as well as the bugfix. I'm running Windows 7 x64, and am using Visual C++ 2010 Express. For 32-bit applications, I perform the following steps and my CUDA applications work properly.



- Create new empty project

- make sure Platform Toolset is set to v100 (normally the default)

- check the CUDA 4.0 Build Customization for the project

- set the item type of my .cu file to CUDA C/C++

- add 'cudart.lib' to Properties->Linker->Input->Additional Dependencies



I can also run non-CUDA 64-bit applications. Visual C++ 2010 Express does not come with 64-bit dependencies automatically, so I had to install the Windows 7.1 SDK w/ .NET Framework 4.0. Then I simply set the Platform Toolset for the VC++ project to Windows7.1SDK, change the Active solution platform to x64, and I'm good to go.



However, I can't seem to do both at the same time - I can't create a 64-bit CUDA application. If I change the Platform Toolset of a CUDA application to Windows7.1SDK, whether the Active solution platform is x64 or Win32, I get the compile error that nvcc.exe exited with code -1. And if I leave the Platform Toolset set to v100 and change the Active solution platform to x64, I get the compile error "fatal error LNK1104: cannot open file 'kernel32.lib'. The only combination that works is v100 and Win32, and obviously that prevents me from running a 64-bit application.



Is there a procedure for enabling this functionality that I just haven't been able to find online? Any ideas or suggestions? Thanks for your time.

#1
Posted 10/07/2011 10:16 PM   
I had the same problem. The solution offered here solved it for me:

[url="http://social.microsoft.com/Forums/en-US/Offtopic/thread/c97adc16-0de1-4ae3-8628-044c9030b2fc"]http://social.microsoft.com/Forums/en-US/Offtopic/thread/c97adc16-0de1-4ae3-8628-044c9030b2fc[/url]
I had the same problem. The solution offered here solved it for me:



http://social.microsoft.com/Forums/en-US/Offtopic/thread/c97adc16-0de1-4ae3-8628-044c9030b2fc

#2
Posted 10/29/2011 06:10 PM   
Scroll To Top