I have recently installed VS2019 & CUDA 10.1 and am trying to compile simple *.cu files at the command line however nvcc is reporting ‘nvcc fatal : Could not set up the environment for Microsoft Visual Studio’
The attempt to run nvcc gives me the error and a long path to vcvars64.bat. The error encapsulates the path with single quotes.
Trying to run the batch file with the single quote encapsulation results in a further error, however running the batch file from the same location using double quotes results in success. Further more running just the vcvars64.bat from the same location (relying on a the preconfigured environment) also works.
Below are the results I am getting:
F:>dir
Volume in drive F is Data
Volume Serial Number is 96F2-97F4
Directory of F:\
29/09/2018 10:56 F
08/04/2019 23:08 3,816 kernel.cu
1 File(s) 3,816 bytes
1 Dir(s) 11,679,765,483,520 bytes free
F:>nvcc kernel.cu
nvcc fatal : Could not set up the environment for Microsoft Visual Studio using ‘C:/Program Files (x86)/Microsoft Visual Studio/2019/Community/VC/Tools/MSVC/14.20.27508/bin/HostX86/x64/…/…/…/…/…/…/…/VC/Auxiliary/Build/vcvars64.bat’
F:>‘C:/Program Files (x86)/Microsoft Visual Studio/2019/Community/VC/Tools/MSVC/14.20.27508/bin/HostX86/x64/…/…/…/…/…/…/…/VC/Auxiliary/Build/vcvars64.bat’
'‘C:’ is not recognized as an internal or external command,
operable program or batch file.
F:>“C:/Program Files (x86)/Microsoft Visual Studio/2019/Community/VC/Tools/MSVC/14.20.27508/bin/HostX86/x64/…/…/…/…/…/…/…/VC/Auxiliary/Build/vcvars64.bat”
** Visual Studio 2019 Developer Command Prompt v16.0.1
** Copyright (c) 2019 Microsoft Corporation
[vcvarsall.bat] Environment initialized for: ‘x64’
F:>vcvars64.bat
** Visual Studio 2017 Developer Command Prompt v16.0.1
** Copyright (c) 2017 Microsoft Corporation
[vcvarsall.bat] Environment initialized for: ‘x64’
F:>
Can anyone suggest why this is happening and what I am doing wrong.
Thanks in anticipation of your help.