Hi All I am a complete novice to C/C++ and after searching for about a week I can't seem to figure out what I'm doing wrong. I would really appreciate if someone could please point me in a direction that would help me getting log4cxx working. I wish to write a number of programs just for myself to mess around with. I am one of those people that like to have logs for everything, so I would really like to have this working.
I have a file log3.cpp #include <log4cxx/logger.h> static log4cxx::LoggerPtr logger("loggername"); void MyClass() { LOG4CXX_INFO(logger, "Hello, World"); } I compliy with g++ log3.cpp -o log3 and get the following error. log3.cpp:2: error: invalid conversion from ‘const char*’ to ‘int’ log3.cpp:2: error: initializing argument 1 of ‘log4cxx::helpers::ObjectPtrT<T>::ObjectPtrT(const int&) [with T = log4cxx::Logger]’ My environment uname -a Linux stormwind 2.6.28-11-generic #42-Ubuntu SMP Fri Apr 17 01:57:59 UTC 2009 i686 GNU/Linux dpkg -l | grep -i log4c ii liblog4cxx10 0.10.0-1 A logging library for C++ ii liblog4cxx10-dev 0.10.0-1 A logging library for C++ (development files ii liblog4cxx10-doc 0.10.0-1 Thanks Duncan ________________________________ Old Mutual Investment Group (South Africa) (Pty) Limited is a licensed Financial Services Provider. This communication is subject to specific restrictions and disclaimers. Details are contained at the following link: http://www.omigsa.com/disclaimer