spdlog icon indicating copy to clipboard operation
spdlog copied to clipboard

Cannot find fmt/core.h file when trying to include <spdlog/sinks/basic_file_sink.h>

Open Dart120 opened this issue 3 years ago • 1 comments

Hiya I installed spdlog via conan, my version is 1.10.0.

When I include <spdlog/sinks/basic_file_sink.h> my IDE says it cannot find spdlog/fmt/core.h which it says is a dependancy of <spdlog/sinks/basic_file_sink.h> I made a temporary fix of it by uncommenting #define SPDLOG_FMT_EXTERNAL in tweakme.h but I was wondering if there was a more "out of the box" fix that made use of the fmt that spdlog installed.

Let me know if theres anymore information I could provide, I'm both new to C++ dev and github issues so there probably is

Dart120 avatar Aug 08 '22 13:08 Dart120

As long as you use spdlog through CMake, the SPDLOG_FMT_EXTERNAL macro is defined, so there is no need to change tweakme.h.

https://github.com/gabime/spdlog/blob/b75edfafca581e33be29ab51b9546b2e955c2853/CMakeLists.txt#L197-L198

Sounds like a conan issue, you might want to open the question in the conan repository

tt4g avatar Aug 08 '22 20:08 tt4g

Ah okay will ask over there!

Dart120 avatar Aug 10 '22 15:08 Dart120