It was a little unusual that you were going off such a old tag. The
current code is so unlike 0.9.7 which was the best release for a long
time but no longer can be supported.
You might try explicitly namesoace qualifying the classes like
::log4cxx::BasicConfigurator::configure
Otherwise try running the preprocessor to see what is getting expanded.
Can't help much over a holiday weekend.
On Apr 10, 2009, at 7:01 AM, Sylvester Steele
<sylvesterste...@gmail.com> wrote:
Hi,
I was trying out the the example at https://svn.apache.org/repos/asf/logging/log4cxx/tags/v0_9_6/examples/trivial.cpp
. Unfortunately it isn't working yet.
My code looks like:
#include <iostream>
#include <log4cxx/logger.h>
#include <log4cxx/basicconfigurator.h>
#include <log4cxx/helpers/exception.h>
#include <log4cxx/ndc.h>
using namespace std;
using namespace log4cxx;
using namespace log4cxx::helpers;
int main() {
BasicConfigurator::configure();
LoggerPtr rootLogger = Logger::getRootLogger();
return 0;
}
Thats it. No other conf files or anything.
The errors are:
1. BasicConfigurator has not been declared
2. configure was not declared in this scope
3. LoggerPtr was not declared in this scope
4. expected ";" before rootLogger
I am using mingw with eclipse. I downloaded log4cxx, unzipped it.
Then I configured eclipse by going to: project properties --> C/C++
general --> Paths and Symbols -->Includes tab --> select GNU C++ -->
click add--> enter the log4cxx path. I can see the log4cxx files
under "includes". If I control+click a log4cxx header that I
included, I can see the code as well.
What could I be doing wrong?
Thanks,
Sylvester