• <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>

            牽著老婆滿街逛

            嚴(yán)以律己,寬以待人. 三思而后行.
            GMail/GTalk: yanglinbo#google.com;
            MSN/Email: tx7do#yahoo.com.cn;
            QQ: 3 0 3 3 9 6 9 2 0 .

            在Windows下編譯最新版本的Libjingle

            轉(zhuǎn)載自:http://mysuperbaby.iteye.com/blog/908866 


            Libjingle版本: 0.5.2

            操作系統(tǒng): Windows XP 
            編譯器: Microsoft Visual C++ 2008 Express 

            具體可以參考README: 
            http://code.google.com/p/libjingle/source/browse/trunk/README 

            這里將根據(jù)我自己的環(huán)境以及遇到的問(wèn)題進(jìn)行總結(jié). 

            1. 安裝Python 2.4或者之后的版本. 因?yàn)閟wtoolkit只能工作在Python 2.x版本, 所以不能安裝Python 3.x版本. 
            下載位置: http://www.python.org/ 

            2. 安裝scons-local 2.0.0或者之后的版本. 設(shè)置環(huán)境變量SCONS_DIR指向包含scons-local的目錄, 如/src/libjingle/scons-local/scons-local-2.0.0.final.0/ 
            注意SCONS_DIR指向的目錄不是你下載的scons-local包直接解壓縮后的目錄 (這個(gè)目錄包括scons.py, scons-README等文件), 而是里面包含的名為scons-local-x.x.x的子目錄 
            下載位置: http://www.scons.org/download.php 

            3. 安裝swtoolkit 
            下載位置: http://code.google.com/p/swtoolkit/ 

            4. 下載expat包, 解壓縮到talk/third_party/expat-2.0.1/ 
            注意不要下載Win32安裝包, 而應(yīng)該是源代碼包 
            下載位置: http://sourceforge.net/projects/expat/ 

            5. 下載最新的srtp包, 解壓縮到talk/third_party/srtp 
            注意不要使用srtp-1.4.4, 因?yàn)檫@個(gè)版本遺漏了Libjingle所使用的一些extensions 
            下載位置: http://sourceforge.net/projects/srtp/develop 
            為了省去你使用CVS下載最新srtp代碼的麻煩, Libjingle已經(jīng)上傳了最新的srtp包, 下載位置:http://libjingle.googlecode.com/files/srtp-cvs.zip 

            如果你的expat和srtp包在其他位置或者名稱不一樣, 需要對(duì)應(yīng)地修改talk/libjingle.scons 

            6. 進(jìn)入到talk目錄, 運(yùn)行$path_to_swtoolkit/hammer.bat 
            將會(huì)進(jìn)行編譯, 最終將在talk/build/dbg/lib目錄下生成: 
            expat.lib  
            libjingle.lib  
            libsrtp.lib  
            libxmpphelp.lib 
            在talk/build/dbg/staging目錄下生成: 
            call.exe 
            login.exe 
            relayserver.exe 
            stunserver.exe 

            下面是可能遇到的編譯問(wèn)題以及對(duì)應(yīng)的解決方法. 
            1. 
            編譯錯(cuò)誤talk\session\phone\devicemanager.cc(31) : fatal error C1083: Cannot open include file: 'atlbase.h': No such file or directory 
            解決方法: 
            1) 安裝Platform SDK 
            下載位置: http://www.microsoft.com/downloads/en/details.aspx?FamilyID=a55b6b43-e24f-4ea3-a93e-40c0ec4f68e5 
            2) 添加c:\Program Files\Microsoft Platform SDK\Include\atl到INCLUDE環(huán)境變量中, 在編譯Libjingle的同一DOS窗口中執(zhí)行set INCLUDE=c:\Program Files\Microsoft Platform SDK\Include\atl;%INCLUDE% 

            Refer to: 
            http://code.google.com/p/libjingle/issues/detail?id=89 

            2. 
            編譯錯(cuò)誤 
            c:\program files\microsoft sdks\windows\v6.0a\include\ws2def.h(91) : error C2220: warning treated as error - no 'object' file generated 
            c:\program files\microsoft sdks\windows\v6.0a\include\ws2def.h(206) : error C2011: 'sockaddr' : 'struct' type redefinition 
            c:\program files\microsoft sdks\windows\v6.0a\include\ws2def.h(437) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int 
            c:\program files\microsoft sdks\windows\v6.0a\include\winsock2.h(132) : error C2011: 'fd_set' : 'struct' type redefinition 
              c:\program files\microsoft sdks\windows\v6.0a\include\winsock.h(68) : see declaration of 'fd_set' 
            c:\program files\microsoft sdks\windows\v6.0a\include\winsock2.h(176) : error C2011: 'timeval' : 'struct' type redefinition 
              c:\program files\microsoft sdks\windows\v6.0a\include\winsock.h(111) : see declaration of 'timeval' 
            ...... 
            解決辦法: 
            在devicemanager.cc中#if WIN32宏開(kāi)始的地方加入 
            #ifndef WIN32_LEAN_AND_MEAN 
            #define WIN32_LEAN_AND_MEAN 
            #endif 
            在在devicemanager.cc中#if WIN32宏結(jié)束之前的地方加入 
            #include <mmsystem.h> 
            最后應(yīng)該如下: 
            #if WIN32
            #ifndef WIN32_LEAN_AND_MEAN
            #define WIN32_LEAN_AND_MEAN
            #endif
            #include 
            <atlbase.h>
            #include 
            <dbt.h>
            #include 
            <strmif.h>  // must come before ks.h
            #include <ks.h>
            #include 
            <ksmedia.h>
            #define INITGUID  // For PKEY_AudioEndpoint_GUID
            #include 
            <mmdeviceapi.h>
            #include 
            <functiondiscoverykeys_devpkey.h>
            #include 
            <uuids.h>
            #include 
            "talk/base/win32.h"  // ToUtf8
            #include "talk/base/win32window.h"
            #include 
            <mmsystem.h>
            #elif OSX

            Refer to: 
            http://code.google.com/p/libjingle/issues/detail?id=89 
            12. Added #include <mmsystem.h> to line 42 of talk\session\phone\devicemanager.cc (Just above the end of the windows tag)

            http://social.msdn.microsoft.com/Forums/en/vclanguage/thread/671124df-c42b-48b8-a4ac-3413230bc43b
            For historical reasons, the Windows.h header defaults to including the Winsock.h header file for Windows Sockets 1.1. The declarations in the Winsock.h header file will conflict with the declarations in the Winsock2.h header file required by Windows Sockets 2.0. The WIN32_LEAN_AND_MEAN macro prevents the Winsock.h from being included by the Windows.h header. 

            So, please add: 
            #ifndef WIN32_LEAN_AND_MEAN 
            #define WIN32_LEAN_AND_MEAN 
            #endif 

            Before 
            "#include <windows.h>". This will tell the compiler to ignore all Winsock 1.1 definitions within windows.h.

            3. 
            Link錯(cuò)誤 
            ________Linking build\dbg\obj\call.exe 
            LINK : fatal error LNK1104: cannot open file 'atlthunk.lib' 
            解決辦法: 
            找到atlbase.h, 注釋掉#pragma comment(lib, "atlthunk.lib") 

            Refer to: 
            http://code.google.com/p/libjingle/issues/detail?id=89 
            13. Found out which version of atlbase.h the compiler was utilizing (In my case, because of the PATH that I set, the version I used was at c:\Program Files\Microsoft Platform SDK\Include\atl.  Edit that file and comment out the line #pragma comment(lib, "atlthunk.lib") which was on or around line 293.

            posted on 2012-07-18 17:02 楊粼波 閱讀(2573) 評(píng)論(0)  編輯 收藏 引用 所屬分類: 網(wǎng)絡(luò)編程C++Windows

            久久综合给合久久狠狠狠97色| 亚洲国产成人久久综合一区77| 久久久久久亚洲精品成人| 久久久久人妻一区二区三区 | 97精品伊人久久久大香线蕉| 国产成人久久精品区一区二区| 7777精品伊人久久久大香线蕉| 精品免费久久久久国产一区| 久久国产美女免费观看精品 | 99久久99久久精品免费看蜜桃| 国产精品久久久久久吹潮| 久久香蕉超碰97国产精品| 亚洲欧美精品一区久久中文字幕| 久久99国产乱子伦精品免费| 久久综合九色综合欧美狠狠| 精品久久久久久无码专区不卡 | 国产香蕉97碰碰久久人人| 九九久久精品国产| 久久精品人人做人人妻人人玩| 国产成人久久精品麻豆一区| 久久午夜无码鲁丝片秋霞| 久久777国产线看观看精品| 中文字幕精品无码久久久久久3D日动漫 | 国产精品久久久久a影院| 色综合久久88色综合天天| 亚洲国产精品无码久久久久久曰 | 久久久久久无码国产精品中文字幕| 中文字幕无码久久人妻| 久久精品成人国产午夜| 久久久久久夜精品精品免费啦| 伊人精品久久久久7777| 久久er热视频在这里精品| 国产亚洲精久久久久久无码| 一本色道久久综合狠狠躁| 亚洲天堂久久久| 国产成人久久777777| 国产精品欧美久久久久无广告| 久久99精品国产99久久| 一本色道久久88—综合亚洲精品| 久久人人爽人人人人片av| 久久人人爽人人爽人人爽|