Closed boocs closed 2 years ago
@leonfs
Seems like this means the compilerPath is mismatched with the compiler in the compile commands file.
In my extension you can set the path setting to the full xcode/clang++ path. You can also see what path the compile commands is using by checking my extension's log if you want to match exactly.
Below is the compile commands first entry command. (WARNING) If getting errors and the compiler path is unexpected reset your UE project.
command: "C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\VC\Tools\MSVC\14.32.31326\bin\HostX64\x64\cl.exe" @"D:\EJ\Documents\Unreal Projects\CPPTest\.vscode\compileCommands_CPPTest\CPPTest.211.rsp"
For example, my project's extension log above it says it's using "C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\VC\Tools\MSVC\14.32.31326\bin\HostX64\x64\cl.exe"
I think I remember reading somewhere that if you just use user/bin/clang++ on Mac the VSCode will try to find whichever one it can in certain known installation spots. That's why it could be mismatched.
In my latest extension version I also have a IntelliSensenseMode setting. You can change it to whichever type of project you're targeting. If you're creating a Native M1 app or some other Arm64 project then you should change the Intellisense Mode. Usually Unreal doesn't use the first part of the Intellisense Mode so try clang-arm64 at first. Of course if you're not targeting a Native project try clang-x64.
Not using the first part of Intellisense Modes could be wrong for M1 macs though so if it doesn't work try macos-clang-arm64 or whatever works.
@leonfs I've released my guide on how to check for VSCode config bugs. This is just a partial Include Errors release. Note: This will get reorganized and changed.
https://github.com/boocs/Unreal-VSCode-diy-config-check-github
Released new updates should fix this. On Mac compiler path might have to be set to /usr/bin/clang++ to work correctly. Whatever compiler this translates to you'll have to change if it's the wrong compiler.
I tested new update on a M1 Mac and it works. I did have to set extension's path setting to /usr/bin/clang++ though.
Also - In the logs of the C++ extension I see this:
Originally posted by @leonfs in https://github.com/boocs/ue4-intellisense-fixes/issues/22#issuecomment-1232615717