undefined reference
Cform 2007-10-03 10:52:31 编译时出错:
.o /e/pocobuild/Foundation/obj/MinGW/ia32/debug_shared/pcre_exec.o /e/pocobuild/Foundation/obj/MinGW/ia32/debug_shared/pcre_ord2utf8.o /e/pocobuild/Foundation/obj/MinGW/ia32/debug_shared/pcre_newline.o /e/pocobuild/Foundation/obj/MinGW/ia32/debug_shared/pcre_fullinfo.o /e/pocobuild/Foundation/obj/MinGW/ia32/debug_shared/pcre_xclass.o -L/e/pocobuild/lib/MinGW/ia32 -liphlpapi -lws2_32 -lpcre
Creating library file: e:/pocobuild/lib/MinGW/ia32/libPocoFoundationd.a
e:/pocobuild/Foundation/obj/MinGW/ia32/debug_shared/LoggingFactory.o(.text$_ZNK4Poco12InstantiatorINS_15EventLogChannelENS_7ChannelEE14createInstanceEv[Poco::Instantiator<Poco::EventLogChannel, Poco::Channel>::createInstance() const]+0x59): In function `ZN4Poco12InstantiatorINS_17FormattingChannelENS_7ChannelEED1Ev':
e:/poco-1.3.1-data/Foundation/include/Poco/Instantiator.h: undefined reference to `Poco::EventLogChannel::EventLogChannel()'
e:/pocobuild/Foundation/obj/MinGW/ia32/debug_shared/LoggingFactory.o(.text$_ZNK4Poco12InstantiatorINS_21WindowsConsoleChannelENS_7ChannelEE14createInstanceEv[Poco::Instantiator<Poco::WindowsConsoleChannel, Poco::Channel>::createInstance() const]+0x59):e:/poco-1.3.1-data/Foundation/include/Poco/Instantiator.h: undefined reference to `Poco::WindowsConsoleChannel::WindowsConsoleChannel()'
e:/pocobuild/Foundation/obj/MinGW/ia32/debug_shared/SyslogChannel.o(.text+0x6e4): In function `ZN4Poco13SyslogChannel4openEv':
e:/poco-1.3.1-data/Foundation/src/SyslogChannel.cpp:76: undefined reference to `openlog'
e:/pocobuild/Foundation/obj/MinGW/ia32/debug_shared/SyslogChannel.o(.text+0x702): In function `ZN4Poco13SyslogChannel5closeEv':
e:/poco-1.3.1-data/Foundation/src/SyslogChannel.cpp:85: undefined reference to `closelog'
e:/pocobuild/Foundation/obj/MinGW/ia32/debug_shared/SyslogChannel.o(.text+0x762): In function `ZN4Poco13SyslogChannel3logERKNS_7MessageE':
e:/poco-1.3.1-data/Foundation/src/SyslogChannel.cpp:94: undefined reference to `syslog'
看样子是是缺少可查了很久
第一我包含了<syslog.h>//这个只有openlog(),closelog()的声明,缺没有定义,
我不知道到底怎么回事?是不是g++时 没有带什么时候-l参数如果缺少库是缺那个我也不知道,望高手指点