I am trying to use easyloggingpp (https://github.com/easylogging/easyloggingpp) on MacOSx with clang in clion. Just including the easyloggingc++.h file doesn't work, I get the following errors.
It seems like some symbols are missing, but really, there is only a header file for easyloggingpp, so I am not sure what's missing.
Undefined symbols for architecture x86_64:
"el::base::utils::s_currentHost", referenced from:
el::base::LogFormat::updateFormatSpec() in main.cpp.o
"el::base::utils::s_currentUser", referenced from:
el::base::LogFormat::updateFormatSpec() in main.cpp.o
"el::base::elStorage", referenced from:
el::base::Writer::construct(int, char const*, ...) in main.cpp.o
el::base::MessageBuilder::operator<<(char const*) in main.cpp.o
el::base::MessageBuilder::operator<<(int) in main.cpp.o
el::base::Writer::processDispatch() in main.cpp.o
el::base::Writer::triggerDispatch() in main.cpp.o
el::base::Writer::initializeLogger(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, bool, bool) in main.cpp.o
el::base::LogDispatcher::dispatch() in main.cpp.o
...
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
MWE:
#include "easylogging++.h"
int main()
{
LOG(INFO)<<"Message";
}