Compile CUDA without Visual Studio - “Cannot find compiler cl.exe in path”

后端 未结 5 2224
一生所求
一生所求 2021-02-06 00:44

I\'ve just begun a small project in CUDA.

I need to know the following: Is it possible to compile CUDA code without using/buying Microsoft Visual Studio? Using Nvcc.exe

5条回答
  •  没有蜡笔的小新
    2021-02-06 01:29

    Update

    As noted in the comments, versions of the SDK after Windows 7's do not include the build tools. If you want to use Microsoft's most recent tools you have to install Visual Studio. Once installed, you can use the tools from the command-line.

    At the moment the free versions are the "Community" versions, e.g. Microsoft Visual Studio Community 2015.

    You can continue to develop apps for Windows 7 and earlier (and they will run on later versions of Windows) using the old SDK tools as I described before:

    Original Answer

    If you desperately want to avoid Visual Studio, download and install the Windows SDK. This contains (more or less) the same build tools as Visual Studio.

    Then run the Windows SDK Command Prompt (which you'll find on the start menu under Microsoft Windows SDK) to set the path to point to the tools, and you are set.

    Or just use Visual C++ Express.

提交回复
热议问题