3

I'm trying to run my 1st cudafy project but I'm getting the following error on the following line:

CudafyModule km = CudafyTranslator.Cudafy();

Below is a screenshot of the exact error message I'm getting.

I've run the example projects which come with Cudafy and they run fine so I don't understand why its saying it can't find the compiler. I've added the Cudafy.net to the references, see screenshot below, and all the info is exactly the same as the example projects, on the right hand side of the image, and that works.

Anyone have any ideas??

EDIT

It appears a similar issue has been answered on SO already but I don't understand where the path environment variable is that he is referring to.

Similar SO question

EDIT 2

Below are the following cl.exe I found. I'm not sure which one to use though. I'm running an Intel processor so I'm leaning towards the bottom one but that's just a guess.

Community
  • 1
  • 1
Hans Rudel
  • 3,433
  • 5
  • 39
  • 62
  • 1
    It's likely the system PATH. You can set it through: 1. Right-click on the My Computer icon 2. Choose Properties from the context menu 3. Click the Advanced tab 4. Click the Environment Variables button 5. Click on the variable called 'Path' and then click on Edit and enter the path for cl.exe – alrikai Jun 19 '13 at 22:08
  • +1, thanks. Which path would u use though? See edit for a screen shot. Thanks. – Hans Rudel Jun 19 '13 at 22:22
  • 1
    You would probably want to use the x86_amd64 one, IIRC the ia64 one refers to the intel itanium processor, which odds are you're not using – alrikai Jun 19 '13 at 22:34
  • it seems to be working. If you put ur 1st n 2nd comments into an ans, i'll mark it as answered. Thanks again for your help. – Hans Rudel Jun 20 '13 at 07:27
  • Possible duplicate of [CUDAfy.NET giving Win32Exception: The system cannot find the file specified](http://stackoverflow.com/questions/14338482/cudafy-net-giving-win32exception-the-system-cannot-find-the-file-specified) – talonmies Oct 02 '15 at 07:18

1 Answers1

5

Glad to hear it worked out for you. Here's the comments in answer form... The linked SO answer is referring to the system PATH. In Windows 7 you can set it through:

  1. Right-click on the My Computer icon
  2. Choose Properties from the context menu
  3. Click the Advanced tab
  4. Click the Environment Variables button
  5. Click on the variable called 'Path' and then click on Edit and enter the path for cl.exe

As for choosing the correct cl.exe, if you're on a non-itanium intel processor (i.e. x86) you'll want x86_amd64

alrikai
  • 4,123
  • 3
  • 24
  • 23