How to install log4cpp from sources?

Posted by Joys of Programming on in C/C++

log4cpp is used for logging purposes in C++. To install log4cpp in Linux is as simple as installing some simple packages like liblog4cpp5 and liblog4cpp5-dev. But if you want to install log4cpp from sources, you need to follow the following procedures. Using these steps, you can easily install log4cpp in Mac and Linux (or any Unix Variant)

  1. Download log4cpp.
  2. Untar the file log4cpp-version.tar.gz. Substitute the version number for version.
    • tar -xzf log4cpp-version.tar.gz
  3. Compile and install
    • cd log4cpp
    • ./configure
    • make
    • sudo make install

Once installed, you can find the log4cpp archive file (liblog4cpp.a) in /usr/local/lib in case of Mac or /usr/lib in case of Linux (Note: these values may vary). But if you want to work with  log4cpp development, refer programming with log4cpp.

Tags: , , , , , , , ,

Comments:

Leave a Reply

Your email address will not be published. Required fields are marked *

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

Copyright © 2009-2012 Joys of Programming All rights reserved.
Desk Mess Mirrored v1.8.1 theme from BuyNowShop.com.