当前位置:网站首页>TeamTalk WinClient编译问题及解决方案
TeamTalk WinClient编译问题及解决方案
2022-06-30 16:53:00 【Hello,C++!】
VS2017编译成功TeamTalk的源码地址:
TeamTalk WinClient编译问题及解决方案
- 一、 is deprecated and will be REMOVED.
- 二、error C2440: “初始化”: 无法从“int”转换为“mbstate_t”
- 三、无法打开文件“mfcs120ud.lib”
- 四、error LNK2038: 检测到“_MSC_VER”的不匹配项: 值“1800”不匹配值“1900”(IM.BaseDefine.pb.obj 中)
一、<hash_map> is deprecated and will be REMOVED.
进入到源码下的win-client\solution目录,打开.sln解决方案,升级为vs2017项目,执行第一次编译,提示如下错误:
fatal error C1189: #error: <hash_map> is deprecated and will be REMOVED.
Please use <unordered_map>. You can define _SILENCE_STDEXT_HASH_DEPRECATION_WARNINGS to acknowledge that you have received this warning.
解决方法:
在源码中搜索:#include <hash_map>,然后在其前面插入如下一行
#define _SILENCE_STDEXT_HASH_DEPRECATION_WARNINGS 1
二、error C2440: “初始化”: 无法从“int”转换为“mbstate_t”
mbstate_t in_state = 0;
改为如下代码:
mbstate_t in_state = {0};
三、无法打开文件“mfcs120ud.lib”
错误提示如下:
1>已完成生成项目“GifSmiley2003.vcxproj”的操作。
2>LINK : fatal error LNK1104: 无法打开文件“mfcs120ud.lib”
分别修改工程utility、Modules的属性
Properties->Linker->Input->Additional Dependencies
将mfcs120ud.lib修改为mfcs140ud.lib或者你电脑上的对应版本
四、error LNK2038: 检测到“_MSC_VER”的不匹配项: 值“1800”不匹配值“1900”(IM.BaseDefine.pb.obj 中)
- 解压win-client\3rdParty目录下的protobuf-2.6.1压缩包,打开protobuf-2.6.1/vsprojects/protobuf.sln
重新生成libprotobuf和libprotobuf-lite两个工程,完成编译后在protobuf目录下的Debug目录中会对应生成两个lib库,将其拷贝到win-client/lib/Debug目录下 - 在命令行里cd到teamtalk/server/src/libsecurity/win/目录下运行build.bat批处理文件
会提示“else 不是内部或外部命令,也不是可运行的程序或批处理文件。”这时候修改批处理文件else跟随到右括号),如下所示:
set "command=%1"
if "%command%" == "clean" (
echo "clean all build..."
rm -rf CMakeFiles
rm -rf Makefile
rm -rf CMakeCache.txt
rm -rf cmake_install.cmake
rm -rf libsecurity.a
)else ( cmake ../src )
再次执行build.bat即可编译出security.sln等相关工程文件
- error C2371: “int8_t”: 重定义;不同的基类型
直接注释掉对应的定义即可
//typedef char int8_t;
再次编译,通过后将lib库其拷贝到win-client/lib/Debug目录。
边栏推荐
- Deep understanding of JVM (I) - memory structure (I)
- Mo Tianlun salon | Tsinghua qiaojialin: Apache iotdb, originated from Tsinghua, is building an open source ecological road
- ASP. Net generate verification code
- Flutter custom component
- If you want to learn software testing, you must see series, 2022 software testing engineer's career development
- Zero foundation can also be an apple blockbuster! This free tool can help you render, make special effects and show silky slides
- IEEE TBD SCI impact factor increased to 4.271, ranking Q1!
- ABAP-发布Restful服务
- 2022上半年盘点:20+主流数据库重大更新及技术要点汇总
- Small tools (3) integration knife4j3.0.3 interface document
猜你喜欢

MySQL advanced - index optimization (super detailed)

Inventory in the first half of 2022: summary of major updates and technical points of 20+ mainstream databases

Deep understanding of JVM (IV) - garbage collection (I)

Radio and television 5g officially set sail, attracting attention on how to apply the golden band

Post penetration file system + uploading and downloading files

Redis (IV) - delete policy

Design of online shopping mall based on SSH

TCP session hijacking based on hunt1.5

How to write a technical proposal

Dropout: immediate deactivation
随机推荐
腾讯云安装mysql数据库
DeFi借贷协议机制对比:Euler、Compound、Aave和Rari Capital
Compile and generate busybox file system
Flutter custom component
基於SSH的網上商城設計
New research of HKUST & MsrA: about image to image conversion, finishing is all you need
Small tools (3) integration knife4j3.0.3 interface document
5g has been in business for three years. Where will innovation go in the future?
Do fresh students get a job or choose a job after graduation?
Distributed machine learning: model average Ma and elastic average easgd (pyspark)
uni-app进阶之自定义【day13】
Importing alicloud ECS locally to solve deployment problems
基于SSH的网上商城设计
VS code 树视图 treeView
Tsinghua only ranks third? 2022 release of AI major ranking of Chinese Universities of soft science
[bjdctf2020]the mystery of ip|[ciscn2019 southeast China division]web11|ssti injection
Only black-and-white box test is required for test opening post? No, but also learn performance test
Partition marble (multiple knapsack + binary optimization)
What will be the game changes brought about by the meta universe?
Elastic 8.0: opening a new era of speed, scale, relevance and simplicity