Cudafy.NET Compilation error

1.9k views Asked by At

I'm trying to use Cudafy.NET for my programming.

At first, I tested the example of cudafy.NET, but it does not work.

cudafyModule km = CudafyTranslator.Cudafy();

This code showed a compilation error.

So, I checked CUDA test in the cudafyviewer, but it was same.

I installed the CUDA Toolkit 7.0 and I added the path of cl.exe to environment variable's system path.

What more do I need?

screenshot

1

There are 1 answers

3
AndreN On

Are you by any chance using VS 2015? Nvcc.exe says doesn't work with that yet. You can try running nvcc.exe /? from a command prompt and you'll likely see this error if you have VS 2015:

C:\WINDOWS\system32>nvcc /?

nvcc fatal : nvcc cannot find a supported version of Microsoft Visual Studio. Only the versions 2010, 2012, and 2013 are supported

Update: I was able to get it to work by making sure the path to cl.exe I'd added to my PATH statement was the one pointing to C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\bin\amd64. (In other words, point it to the version 12 cl.exe instead of the version 14 one.) Now Cudafy.net is working in VS 2015 for me.