English 中文(简体)
我怎么能够让《科索沃法典》的部族延伸了解我在CMake组合中确定的道路? [复制]
原标题:How can I make the VS Code clangd extension aware of the include paths defined in my CMake configuration? [duplicate]

I m coding C++ on a Raspberry Pi 3B through VSCode srange ssh. 目前,我只是人工添加在<编码>上添加所有额外的名录(和其他汇编环境)。

{
    "clangd.fallbackFlags": [
        "-I/usr/include/foo",
        "-I/usr/include/bar",
        "-I${workspaceFolder}/src",
        "-std=c++17"
    ]
}

而Im则寻求以自动方式做到这一点。

页: 1 使用<条码>CMake 工具和IntelliSense plugin,因为CPU和记忆非常消耗,几乎耗尽了RPi s 1GB记忆。 相比之下,<条码>clangd是个灯光,能够由RPi操作。

最佳回答

, 其中规定:

您必须告诉部族如何建设项目(相对旗帜)。

Project Setup

在相联的部族中,请参看:

compile_commands.json
This file provides compile commands for every source file in a project. It is usually generated by tools.

部族将研究你发现的档案的母体目录,以及点名<代码>build/的子公司。 例如,如果编辑<代码>$SRC/gui/window.cpp,我们请上$SRC/gui/build/code>,,,$SRC/build/code>。

Info for people generating compile_commands.json with CMake

Since CMake generates the compile commands database in root of the build tree, unless you re doing an in-source build, you ll probably need to either

See also the docs for

问题回答

暂无回答




相关问题
Why can t CLion see header files, WSL2 toolchain?

My setup: Windows 10 Pro 22H2 (19045.2965) CLion 2020.1.3 (JetBrains) WSL2 with Ubuntu 22.04.2 LTS gcc 11.3.0 cmake 3.22.1 gdb 12.1 gmake 4.3 CMakeLists.txt cmake_minimum_required(VERSION 3.22)...

CMake linking problem

I am trying to use CMake to compile a C++ application that uses the C library GStreamer. My main.cpp file looks like this: extern "C" { #include <gst/gst.h> #include <glib.h> } int main(...

How to add an extra plist property using CMake?

I m trying to add the item <key>UIStatusBarHidden</key><true/> to my plist that s auto-generated by CMake. For certain keys, it appears there are pre-defined ways to add an item; ...

(c)make - resursive compile

Let s assume I have directories like: dir1 main.cpp dir2 abc.cpp dir3 def.cpp dir4 ghi.cpp jkl.cpp And let s assume that main.cpp ...

Reading registry values with cmake

On a Windows 7 machine I cannot read any registry values that contain a semicolon. For example if you have 7-zip, running the following SET(MYPATH [HKEY_LOCAL_MACHINE\SOFTWARE\7-Zip;Path]) ...

Finding the correct Python framework with cmake

I am using the macports version of python on a Snow Leopard computer, and using cmake to build a cross-platform extension to it. I search for the python interpreter and libraries on the system using ...