How to build Apache Log4cxx 0.10 by Visual Studio 201*

Source: Internet
Author: User

Chapter 1 Official Steps

We are going to follow the steps here, http://logging.apache.org/log4cxx/building/vstudio.html. However, we must make changes to adapt to Visual Studio 201*.

1. Download later version of Log4cxx which is Apache Log4cxx 0.10 from here, http://logging.apache.org/log4cxx/download.ht ml

2. Download dependencies from https://archive.apache.org/dist/apr/

3. The official building guideline is quite easy to follow.

1 3 4 5 6 7 unzip apr-1.2.11-win32-src.ziprename apr-1.2.11 aprunzip apr-util-1.2.10-win32-src.ziprename apr-util-1.2.10 apr-utilcdapache-log4cxx-0.10.0configureconfigure-aprutil

4. I recommand you to install Gow in your developer machine and then you'll have many unix/linux like tools, very convenient. Or if you had git, you can add git cmd tools into your env.

configure configure-aprutilabove 2 cmd requires Sed.exe, install it (gow/git) before excute them.Chapter 2 Building log4cxx 1. Now we had to convert *.DSW to *.cxproj. To make it smooth, just launch Visual Studio 201* and open log4cxx.dsw.VS would ask if you like to convert everything. Simply Click Yes.2. Set Log4cxx as Startup Project.3. Open Project Log4cxx ' s Properties window, add other 3 projects as references, in here:Properties-Common properties, framework and references.4. Hit F7 If- c2252, this is because log4cxx_list_def define error, go to its definition and change it to /c6>

#define LOG4CXX_LIST_DEF (n, T) typedef std::vector<t> N

Like this,

Old

#define LOG4CXX_LIST_DEF (N, T) \
Template class Log4cxx_export std::allocator<t>; \
Template class Log4cxx_export std::vector<t>; \
typedef std::vector<t> N

New
#define LOG4CXX_LIST_DEF (n, T) typedef std::vector<t> N

5. and u'll meet another err about insert_iterator, simply add #include <iterator> to reletive file

6. done! Enjoy your log4cxx!

How to build Apache Log4cxx 0.10 by Visual Studio 201*

Related Article

E-Commerce Solutions

Leverage the same tools powering the Alibaba Ecosystem

Learn more >

Apsara Conference 2019

The Rise of Data Intelligence, September 25th - 27th, Hangzhou, China

Learn more >

Alibaba Cloud Free Trial

Learn and experience the power of Alibaba Cloud with a free trial worth $300-1200 USD

Learn more >

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.