log4cxx does not compile on kernel 2.6.29.6
socketoutputstream.cpp: In member function 'virtual void
log4cxx::helpers::SocketOutputStream::write(log4cxx::helpers::ByteBuffer&,
log4cxx::helpers::Pool&)':
socketoutputstream.cpp:52: error: 'memcpy' was not declared in this scope
Same solution as before. I added '#include <string.h>' to socketoutputstream.cpp:
#include <log4cxx/logstring.h>
#include <log4cxx/helpers/socketoutputstream.h>
#include <log4cxx/helpers/socket.h>
#include <log4cxx/helpers/bytebuffer.h>
#include <string.h>
During the 3rd try the following error occured:
console.cpp: In function 'int main(int, char**)':
console.cpp:63: error: 'strcmp' was not declared in this scope
Same solution:
#include <stdlib.h>
#include <string.h>
#include <log4cxx/logger.h>
#include <log4cxx/consoleappender.h>
#include <log4cxx/simplelayout.h>
#include <log4cxx/logmanager.h>
#include <iostream>
#include <locale.h>
After tree times adding string.h as a header all compiled well and after
installation a test programm including '#include
<log4cxx/logger.h>' compiled well.
posted on 2012-08-13 22:23 cn三少<script></script> 阅读(193) 评论(0) 编辑 收藏 举报