安装log4cxx,时候遇到无法编译问题。大神帮忙看看  谢谢,这个问题困扰好几天了。

解决方案 »

  1.   

    报错信息:
    locationinfo.cpp: In member function 'void log4cxx::spi::LocationInfo::write(log4cxx::helpers::ObjectOutputStream&, log4cxx::helpers::Pool&) const':
    locationinfo.cpp:163:21: error: narrowing conversion of '237' from 'int' to 'char' inside { } [-Wnarrowing]
              0x78, 0x70 };
                         ^
    locationinfo.cpp:163:21: error: narrowing conversion of '153' from 'int' to 'char' inside { } [-Wnarrowing]
    locationinfo.cpp:163:21: error: narrowing conversion of '187' from 'int' to 'char' inside { } [-Wnarrowing]
    locationinfo.cpp:163:21: error: narrowing conversion of '225' from 'int' to 'char' inside { } [-Wnarrowing]
    locationinfo.cpp:163:21: error: narrowing conversion of '145' from 'int' to 'char' inside { } [-Wnarrowing]
    locationinfo.cpp:163:21: error: narrowing conversion of '165' from 'int' to 'char' inside { } [-Wnarrowing]
    Makefile:669: recipe for target 'locationinfo.lo' failed
    make[3]: *** [locationinfo.lo] Error 1
    make[3]: Leaving directory '/home/apache-log4cxx-0.10.0/src/main/cpp'
    Makefile:263: recipe for target 'all-recursive' failed
    make[2]: *** [all-recursive] Error 1
    make[2]: Leaving directory '/home/apache-log4cxx-0.10.0/src/main'
    Makefile:263: recipe for target 'all-recursive' failed
    make[1]: *** [all-recursive] Error 1
    make[1]: Leaving directory '/home/apache-log4cxx-0.10.0/src'
    Makefile:315: recipe for target 'all-recursive' failed
    make: *** [all-recursive] Error 1
      

  2.   

    sudo apt-get install libnghttp2-dev
    sudo apt-get install libxml2-dev