2

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

Cœur
  • 37,241
  • 25
  • 195
  • 267
HeeJo You
  • 21
  • 4
  • Welcome to Stack Overflow! I edited your question to properly format it. Please edit to add any additional details to identify the specific problem. Good luck! – Wtower Aug 24 '15 at 12:34

1 Answers1

3

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.

AndreN
  • 611
  • 4
  • 5
  • Oh, you're right. I am using VS2015. I will add the cl.exe of VS2013, and attempt again. Thank you so much. – HeeJo You Oct 29 '15 at 15:38
  • Looking at the second table here http://docs.nvidia.com/cuda/cuda-installation-guide-microsoft-windows/#axzz4gZ5Z4Yyv is this still the case? I still get the error, have not yet tried to download an older VS – Adam May 09 '17 at 07:43
  • My problems was solved by a restart, works fine with VS2015 now – Adam May 10 '17 at 09:45