标签:
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.html
2. download dependencies from https://archive.apache.org/dist/apr/
3. The official building guideline is quite easy to follow.
1
2
3
4
5
6
7
|
unzip apr-1.2.11-win32-src.zip rename apr-1.2.11 apr unzip apr-util-1.2.10-win32-src.zip rename apr-util-1.2.10 apr-util cd apache-log4cxx-0.10.0 configure configure-aprutil |
4. i recommand you install gow in your developer machine, then you‘ll have many unix/linux like tools, very convenient. or if you have git, you can add git cmd tools into your env.
configure
configure-aprutil
#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 will 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*
标签:
原文地址:http://www.cnblogs.com/scottgu/p/5463794.html