Details
-
Bug
-
Status: Resolved
-
Major
-
Resolution: Duplicate
-
0.10.0
-
None
-
None
-
OS: Slackware 13.0
Kernel: 2.6.29.6
Architecture: x86_64
GCC: g++ (GCC) 4.3.3
Description
Tried to compile log4cxx via ./configure && make && make install.
Compiling log4cxx failed with message:
inputstreamreader.cpp: In member function 'virtual log4cxx::LogString log4cxx::helpers::InputStreamReader::read(log4cxx::helpers::Pool&)':
inputstreamreader.cpp:66: error: 'memmove' was not declared in this scope
Therefore i added '#include <string.h>' to inputstreamreader.cpp:
#include <log4cxx/logstring.h>
#include <log4cxx/helpers/inputstreamreader.h>
#include <log4cxx/helpers/exception.h>
#include <log4cxx/helpers/pool.h>
#include <log4cxx/helpers/bytebuffer.h>
#include <string.h>
Due to the next compiling try the following error occured:
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.