在 Windows 7 上编译 libjingle 时出错

Error while compiling libjingle on windows 7

本文关键字:libjingle 出错 编译 Windows      更新时间:2023-10-16

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

锤子.bat --作业=6 --详细 --模式=所有all_programs

我收到此错误:

cl /Fobuilddbgobjsessionphonevideoadapter.obj /c sessionphonevideoadapter.cc /TP /ZI /Od /MTd /RTC1 /nologo /W3 /Fdbuilddbgobjsessionphone
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 /Ibuilddbgobj /I. /IC:code /IC:wtl_71include /IC:include /Ibuilddbgobjthird_partylibudev /Ithird_partylibudev /Ibuildd
bgobjthird_partyexpat-2.0.1lib /Ithird_partyexpat-2.0.1lib /Ibuilddbgobjthird_partygtestinclude /Ithird_partygtestinclude /Ibuilddbgobj
third_partysrtpinclude /Ithird_partysrtpinclude /Ibuilddbgobjthird_partysrtpcryptoinclude /Ithird_partysrtpcryptoinclude /Ibuilddbgobj
third_partyopensslinclude /Ithird_partyopensslinclude
videoadapter.cc
c:codetalkthird_partysrtpcryptoincludeconfig.h(188) : error C2371: 'int8_t' : redefinition; different basic types
        c:program files (x86)microsoft visual studio 10.0vcincludestdint.h(17) : see declaration of 'int8_t'
c:codetalkthird_partysrtpcryptoincludeconfig.h(188) : error C2371: 'int8_t' : redefinition; different basic types
        c:program files (x86)microsoft visual studio 10.0vcincludestdint.h(17) : see declaration of 'int8_t'
scons: *** [builddbgobjsessionphonesrtpfilter.obj] Error 2
scons: building terminated because of errors.

环境详情:

视窗 7

蟒蛇 2.7.3

SCONS 2.1.0

视觉C++ 2010 快车

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

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

如果遇到任何问题:

  • 打开单独的解决方案文件,例如mylibjingle.sln,login.vcxproj,叮当声.vcxproj并参考源文件列表。

  • 将此列表与libjingle.scons文件
  • 进行比较,例如,要构建jingle库,它需要libjingle.scons文件中提到的一组文件,并且在Windows上构建它需要准备类似的Visual Studio项目文件。

    例如:在构建pcp_main.cc时,它会抛出与以下相关的链接器问题:InternetQueryOption

    • 解决方案:在pcp_main.h之上添加了wininet.h,它起作用了。