-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Hi,
I did not find the reason why it does not work the way you do it, but it works when you are using libtool: $ libtool --mode=compile g++ -static -c -I../log4cxx-0.9.8/include -o test.o test.cpp $ libtool --mode=link g++ ../log4cxx-0.9.8-build/src/.libs/liblog4cxx.la - -static -o test test.o > I just build a static version from the svn head and tried to compile a little You should probably consider using the version from http://www.littletux.net/log4cxx since it contains some additional patches which have not yet been committed to SVN. Best Regards, Andreas [...] > #include <log4cxx/logger.h> > #include <log4cxx/basicconfigurator.h> > #include <log4cxx/propertyconfigurator.h> > #include <log4cxx/helpers/exception.h> > > #include <iostream> > > using namespace std; > using namespace log4cxx; > using namespace log4cxx::helpers; > > LoggerPtr logger(Logger::getLogger("MyLogging.Test")); > > int main(int argc, char *argv[]) > { > // LOG4CXX_ERROR(logger, "My first error Log"); > cout << "jojo" << endl; > > > return 0; > } > > > And tried to compile it with: > g++ -I./include -L./lib -llog4cxx -static -o test test.cpp > > And the result is: > /tmp/ccUOHsmb.o: In function `__static_initialization_and_destruction_0(int, > int)': > test.cpp:(.text+0xda): undefined reference to > `log4cxx::Logger::getLogger(char > const*)' > collect2: ld returned 1 exit status - -- Andreas Fester mailto:[EMAIL PROTECTED] WWW: http://www.littletux.net ICQ: 326674288 -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.1 (GNU/Linux) Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org iD8DBQFDZgIDZ3bQVzeW+rsRApJEAKCREhYL7mixAt525uvC1p7kxf1lCQCgqH90 8dghSvud8tqH9ecUkYSG8hg= =IECT -----END PGP SIGNATURE-----