Error compiling CUDA from Command Prompt

前端 未结 6 1321
面向向阳花
面向向阳花 2020-12-05 06:15

I\'m trying to compile a cuda test program on Windows 7 via Command Prompt, I\'m this command:

nvcc test.cu

But all I get is this error:<

6条回答
  •  自闭症患者
    2020-12-05 07:16

    You will need to add the folder containing the "cl.exe" file to your path environment variable. For example:

    C:\Program Files\Microsoft Visual Studio 10.0\VC\bin
    

    Edit: Ok, go to My Computer -> Properties -> Advanced System Settings -> Environment Variables. Here look for "PATH" in the list, and add the path above (or whatever is the location of your cl.exe).

提交回复
热议问题