• <ins id="pjuwb"></ins>
    <blockquote id="pjuwb"><pre id="pjuwb"></pre></blockquote>
    <noscript id="pjuwb"></noscript>
          <sup id="pjuwb"><pre id="pjuwb"></pre></sup>
            <dd id="pjuwb"></dd>
            <abbr id="pjuwb"></abbr>

            戰魂小筑

            討論群:309800774 知乎關注:http://zhihu.com/people/sunicdavy 開源項目:https://github.com/davyxu

               :: 首頁 :: 新隨筆 :: 聯系 :: 聚合  :: 管理 ::
              257 隨筆 :: 0 文章 :: 506 評論 :: 0 Trackbacks

            NDK版本r8

            下載log4cpp-1.1.tar.gz并解壓

            默認情況下, log4cpp準備好了windows平臺的config文件, 但是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 <dlfcn.h> 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 <inttypes.h> header file. */
            #ifndef LOG4CPP_HAVE_INTTYPES_H 
            #define LOG4CPP_HAVE_INTTYPES_H  1 
            #endif
             
            /* Define to 1 if you have the <io.h> 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 <memory.h> 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 <stdint.h> header file. */
            #ifndef LOG4CPP_HAVE_STDINT_H 
            #define LOG4CPP_HAVE_STDINT_H  /**/ 
            #endif
             
            /* Define to 1 if you have the <stdlib.h> header file. */
            #ifndef LOG4CPP_HAVE_STDLIB_H 
            #define LOG4CPP_HAVE_STDLIB_H  1 
            #endif
             
            /* Define to 1 if you have the <strings.h> header file. */
            #ifndef LOG4CPP_HAVE_STRINGS_H 
            #define LOG4CPP_HAVE_STRINGS_H  1 
            #endif
             
            /* Define to 1 if you have the <string.h> 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 <sys/stat.h> header file. */
            #ifndef LOG4CPP_HAVE_SYS_STAT_H 
            #define LOG4CPP_HAVE_SYS_STAT_H  1 
            #endif
             
            /* Define to 1 if you have the <sys/types.h> 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 <unistd.h> 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 <winsock2.h>
            #else
            #include <netdb.h>
            #include <sys/socket.h>
            #include <netinet/in.h>
            #include <arpa/inet.h>
            #endif

            可以刪除RemoteSyslogAppender.cpp里的這個定義即可

            添加Android.mk

            LOCAL_PATH := $(call my-dir)
             
            include $(CLEAR_VARS)
             
            LOCAL_MODULE := log4cpp
             
            LOCAL_SRC_FILES := \
            src/AbortAppender.cpp \
            src/Appender.cpp \
            src/AppendersFactory.cpp \
            src/AppenderSkeleton.cpp \
            src/BasicConfigurator.cpp \
            src/BasicLayout.cpp \
            src/BufferingAppender.cpp \
            src/Category.cpp \
            src/CategoryStream.cpp \
            src/Configurator.cpp \
            src/DllMain.cpp \
            src/DummyThreads.cpp \
            src/FactoryParams.cpp \
            src/FileAppender.cpp \
            src/Filter.cpp \
            src/FixedContextCategory.cpp \
            src/HierarchyMaintainer.cpp \
            src/IdsaAppender.cpp \
            src/LayoutAppender.cpp \
            src/LayoutsFactory.cpp \
            src/LevelEvaluator.cpp \
            src/Localtime.cpp \
            src/LoggingEvent.cpp \
            src/Manipulator.cpp \
            src/MSThreads.cpp \
            src/NDC.cpp \
            src/NTEventLogAppender.cpp \
            src/OmniThreads.cpp \
            src/OstreamAppender.cpp \
            src/PassThroughLayout.cpp \
            src/PatternLayout.cpp \
            src/PortabilityImpl.cpp \
            src/Priority.cpp \
            src/Properties.cpp \
            src/PropertyConfigurator.cpp \
            src/PropertyConfiguratorImpl.cpp \
            src/PThreads.cpp \
            src/RemoteSyslogAppender.cpp \
            src/RollingFileAppender.cpp \
            src/SimpleConfigurator.cpp \
            src/SimpleLayout.cpp \
            src/SmtpAppender.cpp \
            src/StringQueueAppender.cpp \
            src/StringUtil.cpp \
            src/SyslogAppender.cpp \
            src/TimeStamp.cpp \
            src/TriggeringEventEvaluatorFactory.cpp \
             
             
            LOCAL_C_INCLUDES := $(LOCAL_PATH) \
                                $(LOCAL_PATH)/include
                               
             
            include $(BUILD_STATIC_LIBRARY)
             
            編譯即可
            posted on 2013-11-14 17:11 戰魂小筑 閱讀(3211) 評論(0)  編輯 收藏 引用 所屬分類: 移動開發
            久久精品亚洲精品国产欧美| 久久久久亚洲精品天堂| 热综合一本伊人久久精品| 久久99精品国产麻豆蜜芽| 国产99久久久国产精品小说| 久久婷婷成人综合色综合| 久久久精品国产亚洲成人满18免费网站 | 青草久久久国产线免观| 无码精品久久久天天影视| 国产成人精品综合久久久| 久久久久亚洲AV片无码下载蜜桃| 97r久久精品国产99国产精| 青青久久精品国产免费看| 国产精品一区二区久久| 一97日本道伊人久久综合影院| 狠狠色婷婷综合天天久久丁香| 成人综合久久精品色婷婷| 久久国产乱子伦精品免费强| 久久成人小视频| 久久国产福利免费| 精品久久久久久久无码| 亚洲AV日韩AV永久无码久久| 狠狠人妻久久久久久综合| 国产精品久久久久久久| 精品久久久久香蕉网| 久久人人爽人人人人片av| 久久综合视频网站| 久久综合九色欧美综合狠狠 | 好属妞这里只有精品久久| 久久久噜噜噜久久中文字幕色伊伊| 久久97久久97精品免视看| 久久精品国产99国产精偷| 亚洲国产另类久久久精品黑人| 久久亚洲国产精品123区| 久久久精品久久久久久 | 久久www免费人成看片| 久久精品极品盛宴观看| 亚洲国产成人乱码精品女人久久久不卡 | 日韩精品久久久久久| 91精品国产高清久久久久久91| 精品久久久久久中文字幕|