Closed smadurange closed 4 years ago
Test.hpp|6 col 10 error| In included file: 'spdlog/fmt/bundled/core.h' file not found /usr/include/spdlog/ fmt/fmt.h:22:10: note: error occurred here [pp_file_not_found]
Arch package doesn't contain /usr/include/spdlog/fmt/bundled
. That seems to be the fmt
library, so install it properly and use the proper include paths. Or clone the entire spdlog locally.
Test.hpp|13 col 14 error| Call to deleted constructor of 'std::mutex' /../lib64/gcc/x86_64-pc-linux-gnu/9. 3.0/../../../../include/c++/9.3.0/bits/std_mutex.h:94:5: note: 'mutex' has been explicitly marked deleted
The copy constructor of std::mutex
is indeed deleted.
Test.hpp|15 col 9 error| No matching function for call to 'trace' /usr/include/spdlog/spdlog.h:187:13: not e: candidate function template not viable: requires single argument 'msg', but 2 arguments were provided [ ovl_no_viable_function_in_call]
There are 3 overloads of trace()
. Two of which take something called string_view_t
which is [fmt::string_basic_string_view<char
](using string_view_t = fmt::basic_string_viewfmt
library in order to make this work.
Also, your project isn't producing a compile_command.json and you're loading .ycm_extra_conf.py
, rendering the provided CMakeLists.txt
irrelevant. Your flags say that you're using -std=c++11
.
@bstaletic Thanks for the explanation specially about the flags. Managed to fix some other issues I had thanks to that too. I updated .ycm_extra_conf.py
to be similar to my cmake definition.
Also, you are right about the spdlog issue. Thanks!
I'm getting YCM warnings that doesn't seem to be caused by real issues. I'm a beginner, so I apologise if this is a trivial issue. But I could not find a fix myself for this.
vim --version
.:YcmDebugInfo
.:YcmToggleLogs
command.vim -Nu /path/to/YCM/vimrc_ycm_minimal
, including what I expected to happen and what actually happened.install.py
(orcmake
/make
/ninja
) including its invocationThank you for adhering to this process! It ensures your issue is resolved quickly and that neither your nor our time is needlessly wasted.
Issue Details
I'm getting following errors when I'm using
std::mutex
and spdlog libraries:With
std::mutex
:With
spdlog::trace("Hello%d", 1)
I get:Note that spdlog issue only happens when I use string formatting with
%s
or%d
. When I just do something likespdlog::info("Hello")
I do not get any errors from YCM.I installed spdlog using pacman (I'm on Arch Linux x64) and I'm using CMake and Ninja to build the project with clang compiler. My .vimrc file:
Minimal example: Test.hpp:
And in main.cpp, I just import this:
CMakeLists.txt:
Diagnostic data
Output of
vim --version
Output of
YcmDebugInfo
Output of
YcmDiags
Output of
git rev-parse HEAD
in YouCompleteMe installation directoryOS version, distribution, etc.
Arch Linux x64