log4cpp安装报错

错误“BasicLayout.cpp:37: error: expected constructor, destructor, or type conversion

 

before ‘<’ token”

 

需要一个patch

 

 

Index: log4cpp-1.0/src/BasicLayout.cpp
===================================================================
--- log4cpp-1.0.orig/src/BasicLayout.cpp	2008-03-14 16:06:57.000000000 -0400
+++ log4cpp-1.0/src/BasicLayout.cpp	2008-03-14 16:07:11.000000000 -0400
@@ -15,6 +15,8 @@
 #include <sstream>
 #endif
 
+#include <memory>
+
 namespace log4cpp {
 
     BasicLayout::BasicLayout() {
Index: log4cpp-1.0/src/PatternLayout.cpp
===================================================================
--- log4cpp-1.0.orig/src/PatternLayout.cpp	2008-03-14 16:07:33.000000000 -0400
+++ log4cpp-1.0/src/PatternLayout.cpp	2008-03-14 16:07:49.000000000 -0400
@@ -370,7 +370,7 @@
                         literal = "";
                     }
                     if ((minWidth != 0) || (maxWidth != 0)) {
-                        component = new FormatModifierComponent(component, std::abs(minWidth), maxWidth, minWidth < 0);
+                        component = new FormatModifierComponent(component, std::abs((float)minWidth), maxWidth, minWidth < 0);
                         minWidth = maxWidth = 0;
                     }
                     _components.push_back(component);
然后执行patch -pl<1.patch

 

http://bugs.gentoo.org/217755
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值