VS Code preferred version

The problem was that VSCode’s preferred compiler didn’t coincide with mine.
However, problem solved.

  1. Open the C/C++ extension in VSCode
  2. Click ‘Manage’ (the cog wheel next to uninstall)
  3. Choose extension settings
  4. Scroll down to C_cpp > Default: Compiler Path
  5. Click Edit in settings.json
  6. Make sure the last line reads as follows:
  7. “C_Cpp.default.compilerPath”: “C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.38.33130\bin\Hostx64\x86”
  8. Save

Compiler warning now disappears.

1 Like