开发者

compiling cuda visual studio 2008

allright, second question for me.

Windows 7 Professional x64, Visual studio professional 2008, graphics driver up to date, installed the cuda toolkit, the bug fix, the developer drivers, the GPU computing SDK, and Parallel Nsight 2.0. All from nvidia.com/getcuda. (downloaded all the x64 offcourse)

Allright, here's the deal. When I want to compile some CUDA code, say for example the examples that come with Nsig开发者_Go百科ht, I get the error 1>cl : Command line error D8003 : missing source filename 1>Project : error PRJ0019: A tool returned an error code from "Compiling with CUDA Build Rule..." I've searched the web for a solution, and since I'm apparently not the only one, I've found some solutions. Here is what I did:

-at the custom build rules, I selected CUDA Driver API Build Rule (v4.0), and the CUDA Runtime API Build Rule (v4.0)

-at the properties tab of the project, I go to linker/general, and in the field for "Additional Library Dependecies" I put "C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v4.0\lib\x64" which is the correct location for what I need, or so I understood.

-at the linker/input tab, I typt "cudart.lib" in the "Additional Dependecies" tab.

-last, I selected as platform x64 from the Build/Configuration Manager menu.

As you see, I really did some research, and what I did was a solution to many people. Not for me though... So I need some help, maybe you people know what I have to do furthermore?

Thanks in advance!

Edit: also tried this, solves nothing :( http://forums.nvidia.com/index.php?showtopic=91057&st=0&p=513354&#entry513354

Edit2: CUDA and OpenCL samples are running from the SDK 4.0 Browser flawlessly... Why doesn't it compile then..-_-' :P


Check out this answer for step-by-step instructions for adding CUDA to a VS2008 project.

Some other thoughts are below. If none of this helps then probably need more info (or you could post a reproducer on the NVIDIA forums).

  • Don't add both the Driver and the Runtime rules. Add one and stick with it (you probably want the Runtime only).
  • If you're building a 64-bit project then make sure you also switch the CUDA build to 64-bit.
0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜