Log4cplus VS2005 Configuration

Source: Internet
Author: User

Log4cplus is a C + + written open source of the log system, the function is very comprehensive, the use of their own development of the project will be more professional. This article describes the configuration of Log4cplus in VS2005.

First download the Log4cplus source code (I am using version 1.03). There are log4cplus_dll in the solution, and log4cplus two projects generate dynamic link version, and static link version respectively. The options in the compilation are debug,debug_unicode,release,release_unicode. Take dynamic links as an example eventually production log4cplus.dll,log4cplus.lib (release version), Log4cplusd.dll,log4cplusd.lib (Debug edition), Log4cplusu.dll,log4cplusu.lib (Release,unicode edition), Log4cplusUD.dll, Log4cplusUD.lib (Debug,unicode edition). Users choose different lib and DLL combinations depending on their needs.

The following is a log4cplusu.dll,log4cplusu.lib (Release,unicode version), for example, to illustrate the configuration in VS2005.

1. In the project (with the. sln file in the same level directory) to create the Include folder, the Log4cplus folder into the Log4cplus, set up lib file log4cplusU.lib into the folder, in the release put Log4cplusU.dll.

2. In the property-> General-> character Set, select Use Unicode if the non-Unicode version of the Select multiple character set.

3. Add to the-> general-> of the attribute->c/c++ the Include directory. /include

4. In the property->c/c++-> code generation-> Run-time Library is set to/MDD

5. Add in the Properties-> Linker-> General-> Additional Library directory ... /lib

6.-> Enter-> Additional dependencies in the property-> linker log4cplusU.lib

In the configuration, be aware of the separate configuration of the debug and Unicode versions, and use a version that matches the character set settings.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.