loguru icon indicating copy to clipboard operation
loguru copied to clipboard

Unable to use Fmt 6.1.2 with Loguru (ubuntu 20.04)

Open ghost opened this issue 4 years ago • 1 comments

I'm trying to use loguru head with fmt 6.1.2 over an Ubuntu Focal but when I build it I get this linker error . Any CLue?

FAILED: src/doctestM
: && /usr/bin/c++  -fuse-ld=lld -gsplit-dwarf -O2 -g -DNDEBUG   src/CMakeFiles/doctestM.dir/doctest.cc.o  -o src/doctestM  extern/libloguru.a  extern/fmt/libfmt.a  -lrt  -ldl  -pthread && :
ld.lld: error: undefined symbol: loguru::vlog(int, char const*, unsigned int, char const*, fmt::v6::format_args)
>>> referenced by loguru.hpp:570 (../extern/loguru/loguru.hpp:570)
>>>               src/CMakeFiles/doctestM.dir/doctest.cc.o:(_DOCTEST_ANON_FUNC_6())
collect2: error: ld returned 1 exit status
ninja: build stopped: subcommand failed.

ghost avatar May 09 '20 16:05 ghost

Have you tried using including -DLOGURU_USE_FMTLIB=1 in your compile command?

MiguelMJ avatar Jul 09 '20 16:07 MiguelMJ