Visual Studio 2019 breaking the default compiler/bin path on spaces

Vinayak Goswami 1 Reputation point
2021-03-05T13:35:27.037+00:00

I just reinstalled Visual Studio 2019, and I am still getting same error.

Following is the output from build, and the application is the Console Application, that by default prints "Hello World".

Build started...
1>------ Build started: Project: ConsoleApplication1, Configuration: Debug Win32 ------
1>Program
1>c1xx : fatal error C1083: Cannot open source file: 'C:\Program': No such file or directory
1>Files
1>c1xx : fatal error C1083: Cannot open source file: 'Files': No such file or directory
1>Microsoft
1>c1xx : fatal error C1083: Cannot open source file: '(x86)\Microsoft': No such file or directory
1>Visual
1>c1xx : fatal error C1083: Cannot open source file: 'Visual': No such file or directory
1>bin
1>c1xx : fatal error C1083: Cannot open source file: 'Studio\2019\Professional\VC\Tools\Llvm\bin': No such file or directory
1>ConsoleApplication1.cpp
1>Generating Code...
1>Done building project "ConsoleApplication1.vcxproj" -- FAILED.
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========

Visual Studio
Visual Studio
A family of Microsoft suites of integrated development tools for building applications for Windows, the web and mobile devices.
4,627 questions
C++
C++
A high-level, general-purpose programming language, created as an extension of the C programming language, that has object-oriented, generic, and functional features in addition to facilities for low-level memory manipulation.
3,537 questions
{count} votes

1 answer

Sort by: Most helpful
  1. Guido Franzke 2,196 Reputation points
    2021-03-08T10:15:56.487+00:00

    Hello,
    it looks like you run the compiler by yourself in the console. The errors would not occur if you run the build in the VS environment. Why do you run the build in the console by yourself?

    Nevertheless. Check your makefile. It looks like you forgot to add surrounding " to the files with directories.

    Regards, Guido

    0 comments No comments