Closed fronders closed 2 years ago
Have you tried using absolute paths to the compiler?
I confirm what fronders said, but with little difference. I have just installed vs code and added this extension. Unfortunately in file settings.json I do not know why, but the path to gcc and g++ instead of being like you said in manual (/usr/bin/g++ ) is /usr/bin/core_perl/g++. It looks like instead of setting path like in manual it (on my machine) added first file in bin file and than started to looking for g++.
Every change in settings.json is overwritten back.
Absolute Paths do not help.
I am noobie with vs code, but I hope this was helpful.
Does it work in the newest version?
With newest version (4.0.7) it still gets overwritten.
Once I was able to make it stay custom with entering the full path. But then if I changed it back to /usr/bin/gcc
it kept rolling it back to custom. Wasn't able to reproduce it next times (closing vscode, deleting the .vscode folder and reopening + selecting folder to init). Still overrides em to gcc
and g++
. c_cpp_properties still had /usr/bin/gcc
the whole time
UPD: Finally was able to reproduce - it stays custom if I superquickly change both settings and c_cpp_properties until it gets overwritten
Does it work when you only change to your custom path in the properties? This should be then synched to the settings file.
On my win/lin i cannot reproduce this currently
No, changing it only in c_cpp_properties.json to full path does not change settings.json automatically. And after some time it changes c_cpp_properties to /usr/bin/gcc
I confirm what fronders said, but with little difference. I have just installed vs code and added this extension. Unfortunately in file settings.json I do not know why, but the path to gcc and g++ instead of being like you said in manual (/usr/bin/g++ ) is /usr/bin/core_perl/g++. It looks like instead of setting path like in manual it (on my machine) added first file in bin file and than started to looking for g++.
Every change in settings.json is overwritten back.
Absolute Paths do not help.
I am noobie with vs code, but I hope this was helpful.
Is also for you still an issue?
Since i cannot reproduce this...
Since i cannot reproduce this...
I have the same problem also when running under WSL, did you try to reproduce it that way?
The only reason that it can get overwritten is maybe that the path where the compiler is, is not in your PATH
Since i cannot reproduce this...
I have the same problem also when running under WSL, did you try to reproduce it that way?
What exact compiler names and paths?
sorry, on a field trip, will get back to you with this on Thursday
Any update?
Sorry for the delay. Tried again on WSL from scratch in a new folder, and looks like the issue is fixed, probably was caused by some caching (deleting .vscode helped only when folder was not open as a workspace)
For one of the projects I want to use not
gcc
buti686-w64-mingw32-gcc
(to cross compile for windows), which is present under/usr/bin/i686-w64-mingw32-gcc
, but the moment I edit the compiler path and save the local to workspace .settings file it gets overwritten to defaultgcc
.What I'm trying to save in the .settings:
in a blink of an eye it goes back to
and c_cpp_properties.json
Even if I set the compiler paths on user level settings, local workspace still gets overwritten to gcc \ g++