libjingle在Linux下不能编译的解决方法

本文提供了解决Ubuntu环境下Google Talk编译过程中遇到的问题的详细步骤,并指导了如何正确安装该软件。重点包括修改特定头文件、解决编译错误以及通过配置和编译完成安装。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

以Ubuntu为例,先安装
  • sudo apt-get install build-essential
  • sudo apt-get install expat
  • sudo apt-get install libexpat1-dev
  • sudo apt-get install libssl-dev
  • sudo apt-get install pkg-config
  • sudo apt-get install gtk+2.0
然后编译

./configure

make


编译会报错,需要修改
talk/base/stringutils.h
talk/base/base64.h
talk/xmpp/xmppclient.h
talk/p2p/base/sessionmanager.h 160

类似如下,

From:
inline static const char* Traits<char>::empty_str() { return ""; }
To:
inline static const char* empty_str() { return ""; } 

参看一下编译出错的行号就可以找到,很好改。

参考Resources:
http://groups.google.com/group/google-talk-open/browse_thread/thread/bf92d054c144f167

http://cyclone.blog.ubuntu.org.cn/2008/01/23/libjingle-create-a-program/



Errors:

1. ../../../../../../../../kopete/protocols/jabber/googletalk/libjingle/talk/base/socketaddress.cc:284:49: error: 'gethostname' was not declared in this scope

-->https://bugs.kde.org/show_bug.cgi?id=299449
-->http://websvn.kde.org/?view=revision&revision=1290696


  revision 1290695, Sun Jun 13 20:23:29 2010 UTC revision 1290696, Sat Apr 21 10:03:23 2012 UTC
#Line 31 Line 31 
31  #include <netinet/in.h>  #include <netinet/in.h>
32  #include <arpa/inet.h>  #include <arpa/inet.h>
33  #include <netdb.h>  #include <netdb.h>
34    #include <unistd.h>
35  #endif  #endif
36    
37  #include <cstring>  #include <cstring>

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值