/tmp/cc3LFPEx.o: In function `main':
log4.cc:(.text+0x5f): undefined reference to `log4cpp::OstreamAppender::OstreamAppender(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::ostream*)'
log4.cc:(.text+0x90): undefined reference to `log4cpp::PatternLayout::PatternLayout()'
log4.cc:(.text+0x10e): undefined reference to `log4cpp::Category::getRoot()'
log4.cc:(.text+0x13f): undefined reference to `log4cpp::Category::getInstance(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)'
log4.cc:(.text+0x1ab): undefined reference to `log4cpp::Category::info(char const*, ...)'
log4.cc:(.text+0x1c1): undefined reference to `log4cpp::Category::warn(char const*, ...)'
log4.cc:(.text+0x1d7): undefined reference to `log4cpp::Category::error(char const*, ...)'
log4.cc:(.text+0x1ed): undefined reference to `log4cpp::Category::fatal(char const*, ...)'
log4.cc:(.text+0x203): undefined reference to `log4cpp::Category::info(char const*, ...)'
log4.cc:(.text+0x208): undefined reference to `log4cpp::Category::shutdown()'
collect2: error: ld returned 1 exit status
傻逼了,把編譯參數(shù)弄錯了