Это иногда работает, но в основном я получаю следующую ошибку: < /p>
Код: Выделить всё
'fstream' file not foundclang(pp_file_not_found)
< /code>
My Codebase компилируется с Cmake, который генерирует правильный Compile_commands.json.
Пример примера из My compile_commands.json: < /p>
{
"directory": "/path/to/project/build",
"command": "/usr/bin/c++ -DSPDLOG_COMPILED_LIB ....",
"file": "/path/to/project/build/CMakeFiles/project.dir/cmake_pch.hxx.cxx"
},
I[11:06:31.854] Ubuntu clangd version 14.0.0-1ubuntu1.1
I[11:06:31.854] Features: linux+grpc
I[11:06:31.854] PID: 17604
I[11:06:31.854] Working directory: /path/to/project
I[11:06:31.854] argv[0]: /usr/bin/clangd
I[11:06:31.854] argv[1]: --query-driver=/usr/bin/c++
I[11:06:31.854] Starting LSP over stdin/stdout
I[11:06:31.854] reply:initialize(0) 0 ms
I[11:06:31.857]
Подробнее здесь: https://stackoverflow.com/questions/797 ... ers-string
Мобильная версия