Code Yarns β€πŸ‘¨β€πŸ’»
Tech Blog ❖ Personal Blog

How to use CUDA 4.x with Visual Studio 2012

πŸ“… 2012-Dec-12 ⬩ ✍️ Ashwin Nanjappa ⬩ 🏷️ cuda, visual studio ⬩ πŸ“š Archive

A few steps are needed to be able to compile CUDA programs with CUDA 4.x Toolkit and Visual Studio 2012:

  1. CUDA 4.x tools will not work with the Visual C++ 2012 toolset. Thankfully, the older Visual C++ 2010 toolset can be used inside Visual Studio 2012. To do this, change the platform toolset to Visual Studio 2010 (v100).

  2. Place the CUDA 4.x build customization files in the $(VCTargetsPath)\BuildCustomizations directory for Visual Studio 2012. The files can be found in %CUDA_PATH%extras\visual_studio_integration\MSBuildExtensions. TheΒ $(VCTargetsPath) directory for VS2012 should beΒ C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V110 You should be able to add the CUDA Build Customization files to the project, just like in Visual Studio 2010 now.

Tried with: CUDA 4.2, Visual Studio 2012, Visual Studio 2010 and Windows 7 Professional x64


Β© 2023 Ashwin Nanjappa β€’ All writing under CC BY-SA license β€’ 🐘 Mastodon β€’ πŸ“§ Email