Chinaunix首页 | 论坛 | 博客
  • 博客访问: 85190
  • 博文数量: 38
  • 博客积分: 0
  • 博客等级: 民兵
  • 技术积分: 730
  • 用 户 组: 普通用户
  • 注册时间: 2013-11-12 14:05
个人简介

欢迎大家光临我的博客。

文章分类

全部博文(38)

文章存档

2013年(38)

我的朋友

分类: C/C++

2013-11-22 11:57:16

  NDK版本r8

  下载log4cpp-1.1.tar.gz并解压

  默认情况下, log4cpp准备好了windows平台的config文件, fgsj1122但是linux下一般是通过configurator生成的.

  我先找了个linux生成了一下, 然后把config放在log4cpp/include/log4cpp/config.h, 内容参见

  #ifndef _INCLUDE_LOG4CPP_CONFIG_H

  #define _INCLUDE_LOG4CPP_CONFIG_H 1

  /* include/log4cpp/config.h. Generated automatically at end of configure. */

  /* include/config.h. Generated from config.h.in by configure. */

  /* include/config.h.in. Generated from configure.in by autoheader. */

  /* Define to 1 if you have the header file. */

  #ifndef LOG4CPP_HAVE_DLFCN_H

  #define LOG4CPP_HAVE_DLFCN_H 1

  #endif

  /* Define to 1 if you have the `ftime' function. */

  #ifndef LOG4CPP_HAVE_FTIME

  #define LOG4CPP_HAVE_FTIME 1

  #endif

  /* Define to 1 if you have the `gettimeofday' function. */

  #ifndef LOG4CPP_HAVE_GETTIMEOFDAY

  #define LOG4CPP_HAVE_GETTIMEOFDAY 1

  #endif

  /* define if the compiler has int64_t */

  #ifndef LOG4CPP_HAVE_INT64_T

  #define LOG4CPP_HAVE_INT64_T /**/

  #endif

  /* Define to 1 if you have the header file. */

  #ifndef LOG4CPP_HAVE_INTTYPES_H

  #define LOG4CPP_HAVE_INTTYPES_H 1

  #endif

  /* Define to 1 if you have the header file. */

  /* #undef LOG4CPP_HAVE_IO_H */

  /* Define to 1 if you have the `idsa' library (-lidsa). */

  /* #undef LOG4CPP_HAVE_LIBIDSA */

  /* Define to 1 if you have the `localtime_r' function. */

  #ifndef LOG4CPP_HAVE_LOCALTIME_R

  #define LOG4CPP_HAVE_LOCALTIME_R 1

  #endif

  /* Define to 1 if you have the header file. */

  #ifndef LOG4CPP_HAVE_MEMORY_H

  #define LOG4CPP_HAVE_MEMORY_H 1

  #endif

  /* define if the compiler implements namespaces */

  #ifndef LOG4CPP_HAVE_NAMESPACES

  #define LOG4CPP_HAVE_NAMESPACES /**/

  #endif

  /* Define if you have POSIX threads libraries and header files. */

  #ifndef LOG4CPP_HAVE_PTHREAD

  #define LOG4CPP_HAVE_PTHREAD 1

  #endif

  /* define if the C library has snprintf */

  #ifndef LOG4CPP_HAVE_SNPRINTF

  #define LOG4CPP_HAVE_SNPRINTF /**/

  #endif

  /* define if the compiler has stringstream */

  #ifndef LOG4CPP_HAVE_SSTREAM

  #define LOG4CPP_HAVE_SSTREAM /**/

  #endif

  /* define if you have the header file. */

  #ifndef LOG4CPP_HAVE_STDINT_H

  #define LOG4CPP_HAVE_STDINT_H /**/

  #endif

  /* Define to 1 if you have the header file. */

  #ifndef LOG4CPP_HAVE_STDLIB_H

  #define LOG4CPP_HAVE_STDLIB_H 1

  #endif

  /* Define to 1 if you have the header file. */

  #ifndef LOG4CPP_HAVE_STRINGS_H

  #define LOG4CPP_HAVE_STRINGS_H 1

  #endif

  /* Define to 1 if you have the header file. */

  #ifndef LOG4CPP_HAVE_STRING_H

  #define LOG4CPP_HAVE_STRING_H 1

  #endif

  /* Define to 1 if you have the `syslog' function. */

  #ifndef LOG4CPP_HAVE_SYSLOG

  #define LOG4CPP_HAVE_SYSLOG 1

  #endif

  /* Define to 1 if you have the header file. */

  #ifndef LOG4CPP_HAVE_SYS_STAT_H

  #define LOG4CPP_HAVE_SYS_STAT_H 1

  #endif

  /* Define to 1 if you have the header file. */

  #ifndef LOG4CPP_HAVE_SYS_TYPES_H

  #define LOG4CPP_HAVE_SYS_TYPES_H 1

  #endif

  /* define if threading is enabled */

  #ifndef LOG4CPP_HAVE_THREADING

  #define LOG4CPP_HAVE_THREADING 1

  #endif

  /* Define to 1 if you have the header file. */

  #ifndef LOG4CPP_HAVE_UNISTD_H

  #define LOG4CPP_HAVE_UNISTD_H 1

  #endif

  /* Define to the sub-directory in which libtool stores uninstalled libraries.

  */

  #ifndef LOG4CPP_LT_OBJDIR

  #define LOG4CPP_LT_OBJDIR ".libs/"

  #endif

  /* Name of package */

  #ifndef LOG4CPP_PACKAGE

  #define LOG4CPP_PACKAGE "log4cpp"

  #endif

  /* Define to the address where bug reports for this package should be sent. */

  #ifndef LOG4CPP_PACKAGE_BUGREPORT

  #define LOG4CPP_PACKAGE_BUGREPORT ""

  #endif

  /* Define to the full name of this package. */

  #ifndef LOG4CPP_PACKAGE_NAME

  #define LOG4CPP_PACKAGE_NAME "log4cpp"

  #endif

  /* Define to the full name and version of this package. */

  #ifndef LOG4CPP_PACKAGE_STRING

  #define LOG4CPP_PACKAGE_STRING "log4cpp 1.1"

  #endif

  /* Define to the one symbol short name of this package. */

  #ifndef LOG4CPP_PACKAGE_TARNAME

  #define LOG4CPP_PACKAGE_TARNAME "log4cpp"

  #endif

  /* Define to the home page for this package. */

  #ifndef LOG4CPP_PACKAGE_URL

  #define LOG4CPP_PACKAGE_URL ""

  #endif

  /* Define to the version of this package. */

  #ifndef LOG4CPP_PACKAGE_VERSION

  #define LOG4CPP_PACKAGE_VERSION "1.1"

  #endif

  /* Define to necessary symbol if this constant uses a non-standard name on

  your system. */

  /* #undef LOG4CPP_PTHREAD_CREATE_JOINABLE */

  /* Define to 1 if you have the ANSI C header files. */

  #ifndef LOG4CPP_STDC_HEADERS

  #define LOG4CPP_STDC_HEADERS 1

  #endif

  /* define if pthread library is available */

  #ifndef LOG4CPP_USE_PTHREADS

  #define LOG4CPP_USE_PTHREADS 1

  #endif

  /* Version number of package */

  #ifndef LOG4CPP_VERSION

  #define LOG4CPP_VERSION "1.1"

  #endif

  /* _INCLUDE_LOG4CPP_CONFIG_H */

  #endif

  接着, 修改log4cpp/include/log4cpp/RemoteSyslogAppender.hh的包含,改为

  #ifdef WIN32

  #include

  #else

  #include

  #include

  #include

  #include

  #endif

阅读(1298) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~