【发布时间】:2020-02-22 10:06:52
【问题描述】:
我希望能够使用 Windows 10 Powershell 编译和构建提供 here 的 CUDA C 源代码。我使用 x64 Native Tools Command Prompt for VS 2017 没有问题。
但是,我尝试了几种在线建议的方法来让 Powershell 工作,但没有成功。原因是我希望能够在编辑器 Atom 中构建我的 cuda 代码,使用它的包platformio-ide-terminal 在 Atom 中加载一个 Powershell。因此,如果我知道如何在 Powershell 中设置 Visual Studio 2017 社区,我会在 Atom 中编辑我的代码并使用其 Powershell 集成方便地构建它们。
我尝试如下设置环境,但nvcc仍然找不到cl.exe的路径。
有人可以帮助我吗?
Windows PowerShell
Copyright (C) Microsoft Corporation. All rights reserved.
Try the new cross-platform PowerShell https://aka.ms/pscore6
PS C:\Users\AFP\Downloads\cuda_by_example> cd "C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Auxiliary\Build\"
PS C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Auxiliary\Build> .\vcvarsall.bat amd64
**********************************************************************
** Visual Studio 2017 Developer Command Prompt v15.7.3
** Copyright (c) 2017 Microsoft Corporation
**********************************************************************
[vcvarsall.bat] Environment initialized for: 'x64'
PS C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Auxiliary\Build> cd C:\Users\AFP\Downloads\cuda_by_example\
PS C:\Users\AFP\Downloads\cuda_by_example> nvcc .\chapter03\hello_world.cu
nvcc fatal : Cannot find compiler 'cl.exe' in PATH
PS C:\Users\AFP\Downloads\cuda_by_example>
【问题讨论】:
标签: visual-studio powershell cuda nvcc cl