我遵循libjingle下载中包含的自述文件。安装所有第3方软件包并运行以下命令:

Hammer.bat --jobs = 6 --verbose --mode = all all_programs

我收到此错误:

cl /Fobuild\dbg\obj\session\phone\videoadapter.obj /c session\phone\videoadapter.cc /TP /ZI /Od /MTd /RTC1 /nologo /W3 /Fdbuild\dbg\obj\session\phone\
videoadapter.obj.pdb /WX /Zc:forScope /EHs-c- /GR- /Gy /wd4996 /w14701 /w14702 /w14706 /w14709 /w14063 /w14064 /w14057 /w14263 /w14266 /w14296 /w14355
 /DLOGGING=1 /DFEATURE_ENABLE_SSL /DFEATURE_ENABLE_VOICEMAIL /DFEATURE_ENABLE_PSTN /DHAVE_SRTP /D_ATL_CSTRING_EXPLICIT_CONSTRUCTORS /D_CRT_SECURE_NO_W
ARNINGS /D_SCL_SECURE_NO_WARNINGS /D_USE_32BIT_TIME_T /D_UNICODE /DUNICODE /D_HAS_EXCEPTIONS=0 /DWIN32 /DWINVER=0x0500 /D_WIN32_WINNT=0x0501 /D_WIN32_
IE=0x0501 /DNTDDI_VERSION=NTDDI_WINXP /D_WINDOWS /D_DEBUG /DFEATURE_ENABLE_VOICEMAIL /DEXPAT_RELATIVE_PATH /DGTEST_RELATIVE_PATH /DSRTP_RELATIVE_PATH
/DXML_STATIC /D_LIB /Ibuild\dbg\obj /I. /IC:\code /IC:\wtl_71\include /IC:\include /Ibuild\dbg\obj\third_party\libudev /Ithird_party\libudev /Ibuild\d
bg\obj\third_party\expat-2.0.1\lib /Ithird_party\expat-2.0.1\lib /Ibuild\dbg\obj\third_party\gtest\include /Ithird_party\gtest\include /Ibuild\dbg\obj
\third_party\srtp\include /Ithird_party\srtp\include /Ibuild\dbg\obj\third_party\srtp\crypto\include /Ithird_party\srtp\crypto\include /Ibuild\dbg\obj
\third_party\openssl\include /Ithird_party\openssl\include
videoadapter.cc
c:\code\talk\third_party\srtp\crypto\include\config.h(188) : error C2371: 'int8_t' : redefinition; different basic types
        c:\program files (x86)\microsoft visual studio 10.0\vc\include\stdint.h(17) : see declaration of 'int8_t'
c:\code\talk\third_party\srtp\crypto\include\config.h(188) : error C2371: 'int8_t' : redefinition; different basic types
        c:\program files (x86)\microsoft visual studio 10.0\vc\include\stdint.h(17) : see declaration of 'int8_t'
scons: *** [build\dbg\obj\session\phone\srtpfilter.obj] Error 2

scons: building terminated because of errors.


环境详细信息:

Windows 7的

python 2.7.3

斯康2.1.0

Visual C ++ 2010 Express

最佳答案

通过以下链接成功编译libjingle 0.6.14:http://code.google.com/p/libjingle/issues/detail?id=242 [Used Visual Studio 2010 Professional]。


提到的链接提供了mylibjingle.rar,该链接提供了解决方案文件。


如果遇到任何问题:


打开单个解决方案文件,例如mylibjingle.sln,login.vcxproj,jingle.vcxproj
并参考源文件列表。
将此列表与libjingle.scons文件进行比较,例如要构建jingle库,它需要如libjingle.scons文件中所述的文件集,而要在Windows上构建,则需要准备类似的Visual Studio项目文件。

例如:在构建pcp_main.cc时,它引发与以下链接器有关的问题:InternetQueryOption


解决方案:在pcp_main.h顶部添加了wininet.h,并且可以正常工作。

09-07 23:34