undefined refrence to

/tmp/cc3LFPEx.o: In function `main':
log4.cc:(.text+0x5f): undefined reference to `log4cpp::OstreamAppender::OstreamAppender(std::__cxx11::basic_string, std::allocator > 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, std::allocator > 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

傻逼了,把编译参数弄错了

参考(http://blog.csdn.net/cserchen/article/details/5503556)

你可能感兴趣的:(undefined refrence to)