`

Step by Step about How to Build libjingle 0.4

阅读更多
1. Download and Install Visual C++ 2010 Express
http://www.microsoft.com/express/Downloads/#2010-Visual-CPP

2. Download and install binary package for Expat
http://sourceforge.net/projects/expat/files/expat_win32/
Currently the latest version is 2.0.1, which is my selection.

After installed, remember the below two directories:
Header file diretory: C:\Program Files (x86)\Expat 2.0.1\Source\lib
Lib file directory: C:\Program Files (x86)\Expat 2.0.1\Bin

3. Download the libjingle 0.4 zip and unzip it

http://libjingle.googlecode.com/files/libjingle-0.4.0.zip

4. Open the solution with Visual C++ 2010 Express
Open Visual C++ 2010 Express, click File->Open->Project/Solution, select talk/libjincle.sln, it will prompt solution conversion, continue. Now you may see there are three projects in the solution.


5. Configure the Expat directories for the solution
Right click "libjingle" project in the Solution Explorer, select Properties, and config the VC++ Diretories as the below:
Include Directories: C:\Program Files (x86)\Expat 2.0.1\Source\lib
Library Directories: C:\Program Files (x86)\Expat 2.0.1\Bin


6. Build the libjingle project

Right click "libjingle" project in the Solution Explorer, select Build. The build will start.
After build finished, you will find build failure with the below error information:
gipslitemediaengine.h(33): fatal error C1083: Cannot open include file: 'talk/third_party/gips/Interface/GipsVoiceEngineLite.h': No such file or directory
1>  gipslitemediaengine.cc


Don't worry. It is because on Windows the project depend on GIPS voice engine. Since we don't care the voice call now, so select all files on Source Files->session->phone, right click and select Exclude From Project. Build again. This time you will make build successfully.
And you may find the generated talk\Debug\libjingle.lib.

7. Build pcp project.

Configure the he Expat directories for this project as step 5. You will make build successfully. And you may find the generated talk\Debug\pcp.exe.

8. Test receiving file.
Run the below command:
pcp

Then send a file to this gmail account from Google Talk client with another account.


9. Test sending file.
Run the below command:
pcp 01.jpg lisi.android@gmail.com

Then accept the file from Google Talk client with the recepient account.


At last,
You may try the attached binary pcp.exe for the test.
And in fact, for Expat XML Parser, you don't need install it, only expat.h/expat_external.h and libexpatMT.lib are needed, which I have attached.

  • 大小: 6.5 KB
  • 大小: 68.3 KB
  • 大小: 32.3 KB
  • 大小: 34.7 KB
  • pcp.rar (686.3 KB)
  • 下载次数: 21
分享到:
评论
3 楼 zee3.lin 2015-04-27  
Sorry~~
When I build "call" project ,I have some compiler error.
Could you please help to provide the solution for me reference?
below is my error message.
=====================================================================
callclient.obj : error LNK2019: unresolved external symbol "public: void __thiscall cricket::Call::Mute(bool)" (?Mute@Call@cricket@@QAEX_N@Z) referenced in function "public: void __thiscall CallClient::ParseLine(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &)" (?ParseLine@CallClient@@QAEXABV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@Z)
callclient.obj : error LNK2019: unresolved external symbol "public: void __thiscall cricket::Call::Terminate(void)" (?Terminate@Call@cricket@@QAEXXZ) referenced in function "public: void __thiscall CallClient::ParseLine(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &)" (?ParseLine@CallClient@@QAEXABV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@Z)
callclient.obj : error LNK2019: unresolved external symbol "public: void __thiscall cricket::Call::RejectSession(class cricket::Session *)" (?RejectSession@Call@cricket@@QAEXPAVSession@2@@Z) referenced in function "public: void __thiscall CallClient::ParseLine(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &)" (?ParseLine@CallClient@@QAEXABV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@Z)
callclient.obj : error LNK2019: unresolved external symbol "public: void __thiscall cricket::PhoneSessionClient::SetFocus(class cricket::Call *)" (?SetFocus@PhoneSessionClient@cricket@@QAEXPAVCall@2@@Z) referenced in function "public: void __thiscall CallClient::ParseLine(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &)" (?ParseLine@CallClient@@QAEXABV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@Z)
callclient.obj : error LNK2019: unresolved external symbol "public: void __thiscall cricket::Call::AcceptSession(class cricket::Session *)" (?AcceptSession@Call@cricket@@QAEXPAVSession@2@@Z) referenced in function "public: void __thiscall CallClient::ParseLine(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &)" (?ParseLine@CallClient@@QAEXABV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@Z)
callclient.obj : error LNK2019: unresolved external symbol "public: class std::vector<class cricket::Session *,class std::allocator<class cricket::Session *> > const & __thiscall cricket::Call::sessions(void)" (?sessions@Call@cricket@@QAEABV?$vector@PAVSession@cricket@@V?$allocator@PAVSession@cricket@@@std@@@std@@XZ) referenced in function "public: void __thiscall CallClient::ParseLine(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &)" (?ParseLine@CallClient@@QAEXABV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@Z)
callclient.obj : error LNK2019: unresolved external symbol "public: __thiscall cricket::PhoneSessionClient::PhoneSessionClient(class buzz::Jid const &,class cricket::SessionManager *)" (??0PhoneSessionClient@cricket@@QAE@ABVJid@buzz@@PAVSessionManager@1@@Z) referenced in function "private: void __thiscall CallClient::InitPhone(void)" (?InitPhone@CallClient@@AAEXXZ)
callclient.obj : error LNK2019: unresolved external symbol "public: class cricket::Session * __thiscall cricket::Call::InitiateSession(class buzz::Jid const &,class std::vector<class buzz::XmlElement *,class std::allocator<class buzz::XmlElement *> > *)" (?InitiateSession@Call@cricket@@QAEPAVSession@2@ABVJid@buzz@@PAV?$vector@PAVXmlElement@buzz@@V?$allocator@PAVXmlElement@buzz@@@std@@@std@@@Z) referenced in function "public: void __thiscall CallClient::MakeCallTo(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &)" (?MakeCallTo@CallClient@@QAEXABV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@Z)
callclient.obj : error LNK2019: unresolved external symbol "public: class cricket::Call * __thiscall cricket::PhoneSessionClient::CreateCall(void)" (?CreateCall@PhoneSessionClient@cricket@@QAEPAVCall@2@XZ) referenced in function "public: void __thiscall CallClient::MakeCallTo(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &)" (?MakeCallTo@CallClient@@QAEXABV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@Z)
===================================================================
My develop environment:
libjingle-0.4.0
vs 2010

Thank you very much.
2 楼 laiyangdeli 2011-02-15  
Build 'call' example:
1. 添加libexpatMT.lib的路径
2. 去掉gipsvoiceenginelite.lib, 改为mediastreamer2.lib, 并添加mediastreamer2.lib的路径
3. 添加ortp.lib, 并添加ortp.lib的路径. 注意在生成ortp.lib时候, 需要更改ortp.def, 添加下面全局变量的定义以便导出到lib中
   payload_type_pcmu8000
   ...
   payload_type_telephone_event
   av_profile
1 楼 laiyangdeli 2011-02-15  
talk\third_party创建expat目录, 在expat目录下, 创建include目录, 拷贝expat.h和expat_external.h; 创建lib目录, 拷贝libexpatMT.lib
加include路径到工程中

talk\third_party创建glib目录, 在glib目录下, 创建include目录, 拷贝glib的头文件以及glibconfig.h; 创建lib目录, 拷贝glib的lib
加include路径到工程中

talk\third_party创建ortp目录, 在ortp目录下, 创建include目录, 拷贝ortp的头文件; 创建lib目录, 拷贝ortp的lib
加include路径到工程中

talk\third_party创建mediastreamer2目录, 在mediastreamer2目录下, 创建include目录, 拷贝mediastreamer2的头文件; 创建lib目录, 拷贝mediastreamer2的lib
加include路径到工程中

在linphonemediaengine.cc
#include "talk/third_party/mediastreamer/mediastream.h"
改为
#include "mediastreamer2/mediastream.h"

注释掉
#include "talk/third_party/mediastreamer/msspeexdec.h"

注释掉
#include <netdb.h>
#include <unistd.h>

将speex_wb改为payload_type_speex_wb
将pcmu8000改为payload_type_pcmu8000
将telephone_event改为payload_type_telephone_event

注释掉
static void null_log_handler(const gchar *log_domain,
          GLogLevelFlags log_level,
     const gchar *message,
     gpointer user_data) {
  LOG(LS_INFO) << log_domain << " " << message;
}
g_log_set_handler("MediaStreamer", G_LOG_LEVEL_MASK, null_log_handler, this);
g_log_set_handler("oRTP", G_LOG_LEVEL_MASK, null_log_handler, this);
g_log_set_handler("oRTP-stats", G_LOG_LEVEL_MASK, null_log_handler, this);

ms_speex_codec_init();


audio_stream_ = audio_stream_start(&av_profile, 2000, "127.0.0.1", 3000, i->id, 250);
改为
audio_stream_ = audio_stream_start(&av_profile, 2000, "127.0.0.1", 3000, i->id, 250, true);


1>  linphonemediaengine.cc
1>c:\program files (x86)\microsoft sdks\windows\v7.0a\include\wspiapi.h(48): error C2894: templates cannot be declared to have 'C' linkage

注释
// extern "C" {
// }



int LinphoneMediaChannel::GetOutputLevel() {return 0;}
int LinphoneMediaEngine::SetAudioOptions(int options) {return 0;}
int LinphoneMediaEngine::SetSoundDevices(int wave_in_device, int wave_out_device) {return 0;}
float LinphoneMediaEngine::GetCurrentQuality() {return 0;}
int LinphoneMediaEngine::GetInputLevel() {return 0;}

linphonemediaengine.h
注释
// extern "C" {
// }

#include "talk/third_party/mediastreamer/mediastream.h"
改为
#include "mediastreamer2/mediastream.h"

相关推荐

Global site tag (gtag.js) - Google Analytics