visual studio code - How let vscode auto use cmake include ...
stackoverflow.com › questions › 63125960Jul 28, 2020 · "But the vscode can't automatic parse cmake config to get right include path." - There is no "cmake config" which contains include paths. These paths are obtained only when CMakeLists.txt is processed (not parsed, but executed, line by line). If VSCode doesn't process CMakeLists.txt, then you need to create a compile_commands.json file from CMake project. This file contains all compiler settings and it can be used by VSCode.
C/C++ project with vscode, CMake
nvdungx.github.io › vscode-cmakeAug 01, 2021 · Create a folder for your project, open vscode then [Ctrl + k + o] to open your project folder. Create a main.cpp and input your sample code. #include <iostream> int main(int argc, const char* argv[]) { std::cout << "ayy" << std::endl; } [Ctrl + Shift + p]: type in “C/C++: edit configurations”.