Closed tschoonj closed 4 years ago
Hi @tschoonj . The C/C++ Extension does not auto-detect the appropriate configuration to use. You need to select a configuration either by clicking on the configuration at the bottom of the VS Code window (while a C/C++ file is in focus), or using the C/C++: Select a Configuration...
command.
Thank you for the hint: this works indeed.
I am surprised that there is no auto-detection going on, since the documentation appears to say otherwise:
name A friendly name that identifies a configuration. Linux, Mac, and Win32 are special identifiers for configurations that will be autoselected on those platforms. The status bar in VS Code will show you which configuration is active. You can also click on the label in the status bar to change the active configuration.
Hi @tschoonj . I stand corrected. I did not know this feature existed. :) We'll take a look.
I seem to recall (from a long time ago) the auto-config detection doesn't work if there are less than 3 configs, so adding a 3rd "windows" config that is unused might fix it.
The 3 config thing was from a while ago, I just tried this and didn't reproduce the incorrect config selection. But we only auto-config the first time you open a folder or if you make changes to the config that remove the currently selected config. Otherwise we will continue to use the previously selected config.
If you are still having a problem with this, let us know. I will close the issue for now.
Type: LanguageService
Describe the bug
To Reproduce I have the following c_cpp_properties.json file:
Expected behavior That the system would be properly recognized as Linux and the corresponding configuration used. I cannot seem to find a way either to force it to use Linux either...
Screenshots
Additional context
Thanks for looking into this.