question

VinayakGoswami-9165 avatar image
0 Votes"
VinayakGoswami-9165 asked TianyuSun-MSFT edited

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

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 ==========

c++vs-general
· 3
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Hi @VinayakGoswami-9165 , welcome to Microsoft Q&A forum. If you try to create a new C++ console application and keep the project saved in the default directory then build it, will this error disappear?

It seems this issue is caused by the directory, did you perform some actions before? Could you describe more details about how you install VS, change something(maybe), and create and build a project?

0 Votes 0 ·

I have tried the same with new console application, but the result is same.

I fell the problem is the with compiler as on compiling with the developer CMD I get the following error: -

75324-image.png



As for install I have only selected

Desktop development with C++ in the visual studio installer

Everything else is set to default values.


0 Votes 0 ·
image.png (85.5 KiB)

Hi @VinayakGoswami-9165 , sorry for the late reply. It seems that some settings have been modified or there are something wrong with the development environment. Did you change some settings or set some directories and variables before? Did you uninstall VS from VS Installer? Did you remove some files and folders?

0 Votes 0 ·

1 Answer

GuidoFranzke avatar image
0 Votes"
GuidoFranzke answered

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

5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.