emilk / loguru

A lightweight C++ logging library
The Unlicense
1.77k stars 256 forks source link

Unable to use Fmt 6.1.2 with Loguru (ubuntu 20.04) #140

Open ghost opened 4 years ago

ghost commented 4 years ago

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.
MiguelMJ commented 4 years ago

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