Skip to content

I have error when i use the "make" instruction #76

@TY-cc

Description

@TY-cc

The error as follow:
[ 52%] Built target apsi [ 54%] Linking CXX executable bin/unit_tests lib/libapsi-0.12.a(log.cpp.o): In function apsi::Log::DoLog(std::__cxx11::basic_string<char, std::char_traits, std::allocator >, apsi::Log::Level)':
log.cpp:(.text+0x16f): undefined reference to log4cplus::Logger::getInstance(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)' log.cpp:(.text+0x191): undefined reference to log4cplus::Logger::log(int, std::__cxx11::basic_string<char, std::char_traits, std::allocator > const&, char const*, int, char const*) const'
lib/libapsi-0.12.a(log.cpp.o): In function apsi::Log::SetLogLevel(apsi::Log::Level)': log.cpp:(.text+0x223): undefined reference to log4cplus::Logger::getInstance(std::__cxx11::basic_string<char, std::char_traits, std::allocator > const&)'
lib/libapsi-0.12.a(log.cpp.o): In function apsi::Log::Configure()': log.cpp:(.text+0x374): undefined reference to log4cplus::Logger::getInstance(std::__cxx11::basic_string<char, std::char_traits, std::allocator > const&)'
log.cpp:(.text+0x44b): undefined reference to log4cplus::PatternLayout::PatternLayout(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)' log.cpp:(.text+0x49e): undefined reference to log4cplus::Logger::getInstance(std::__cxx11::basic_string<char, std::char_traits, std::allocator > const&)'
log.cpp:(.text+0x541): undefined reference to log4cplus::RollingFileAppender::RollingFileAppender(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, long, int, bool, bool)' log.cpp:(.text+0x5d1): undefined reference to log4cplus::PatternLayout::PatternLayout(std::__cxx11::basic_string<char, std::char_traits, std::allocator > const&)'
log.cpp:(.text+0x624): undefined reference to log4cplus::Logger::getInstance(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)' log.cpp:(.text+0x6ff): undefined reference to log4cplus::Logger::getInstance(std::__cxx11::basic_string<char, std::char_traits, std::allocator > const&)'
collect2: error: ld returned 1 exit status
make[2]: *** [bin/unit_tests] Error 1
make[1]: *** [CMakeFiles/unit_tests.dir/all] Error 2
make: *** [all] Error 2`

How do i modify the CMakeList.txt?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions