Closed septag closed 5 years ago
Have you tried adding these additional flags to the compilerPath
property? This should work in the current version of the extension.
"compilerPath": "D:/SDK/Android/ndk-bundle/toolchains/llvm/prebuilt/windows-x86_64/bin/clang.exe --sysroot=... --gcc-toolchain=..."
We are in the process of adding a new property: compilerArgs
to make this more obvious in the future.
Oh, I was searching for something like 'args' property. It is working now. Thank you
System: windows 10 vscode: 1.37.0-insider Cpp-tools: 0.24.1
I'm trying to configure NDK project on android, but I get error squiggles for not finding 'sysroot' include files like alloca.h and assert.h:
compiler path pointing to ndk's clang.exe, and I'm using compile_commands.json for intellisense.
here is my configuration:
Here is the log:
I have noticed that the 'sysroot' directory (
--sysroot=D:/SDK/Android/ndk-bundle/toolchains/llvm/prebuilt/windows-x86_64/sysroot
in compile_commands.json ) is not added in 'include' directories. So if I add the following directories:to the -I flags, the error squiggles will be gone.
By inspecting a little more, I've found that in order to get these extra directories from the compiler, cpp-tools has to add valid
--gcc-toolchain
,--sysroot
and--target
to the clang compiler.How can I provide these parameters for the compiler to properly set default include paths ?
Thank you