开发者

How does one compile a CUDA Toolkit 4.0 RC2 program under VS2010 or VS2008?

I'm a complete CUDA beginner and I'm trying to figure out how to write and compile a test CUDA program using Visual Studio.

I have the CUDA 4 toolkit installed and both the 2008 and 2010 versions of Visual Studio installed. I read that 开发者_运维问答starting with CUDA 4.0, support for the VS100 compiler has been added, I just have no idea how to set my project to use NVCC and whether or not that is all I need to do to compile a basic program. If there is no support for VS100, I will gladly use VS2008 and the VS90 compiler, but I still don't know how to make the project use the CUDA 4.0 compiler.

I would be very grateful if someone could explain how to get this done. Thank you all in advance!


I wrote a couple of tutorials on how to do this.

http://www.ademiller.com/blogs/tech/2011/03/using-cuda-and-thrust-with-visual-studio-2010/

http://www.ademiller.com/blogs/tech/2011/04/using-cuda-and-thrust-with-vs-2010-part-2-x64-builds/

These are for 4.0 RC not RC2 but they should be fine. First thing I'd recommend is to install NVIDIA NSight 1.51. This will solve most of the basic setup issues for you. You need both VS 2010 and 2008 for the v90 compiler.

Then work through the tutorials.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜