A Developer's Diary

Dec 25, 2008

Building Apache Log4cxx on Windows

Apache Log4CXX is a logging framework for C++ patterned after Apache log4j.
Read below for sequence of steps for building the software with Visual Studio .NET 2003

1. Download APR 1.3.3 and extract it. Rename to apr
2. Download APR Util 1.3.3 and extract it. Rename to apr-util
3. Download Log4CXX 0.10.0 and extract it
4. Enter directory apache-log4cxx-0.10.0
5. Execute configure.bat
6. Execute configure-aprutil.bat
7. Open the log4cxx.dsw file. When asked to convert the solution, click Yes to All
8. Right click on Solution log4cxx and select Build solution


The above process builds the dll log4cxx.dll

Steps for building log4cxx static library
1. Add LOG4CXX_STATIC preprocessor definition to the project
2. Make sure all the modules used are linked with the same runtime library. (error LNK2005)
3. Add ws2_32.lib and mswsock.lib to the linker dependencies (otherwise you end up getting LNK2019 unresolved external symbol errors)

No comments :

Post a Comment