当前位置:网站首页>VS2017编译Tars测试工程
VS2017编译Tars测试工程
2022-07-30 21:55:00 【Hello,C++!】
1、Windows环境下载并编译TarsCpp
git clone https://github.com/TarsCloud/TarsCpp.git --recursive
cd TarsCpp;
mkdir build;
cd build;
cmake .. -G "Visual Studio 15 2017"
cmake --build . --config release
#install
cmake --build . --config release --target install
12345678
注意:如果需要安装debug库,则指令改成如下:
cd TarsCpp;
mkdir build;
cd build;
cmake .. -G "Visual Studio 15 2017"
cmake --build . --config debug
#install
cmake --build . --config debug --target install
1234567
一般情况下编译可以正常。如果安装出现各种问题,可以重装系统和VS2017试试。。。
编译安装完成后,默认会在C盘下生成Tars的库以及头文件。
2、开发TarsCpp测试工程
新建VS2017工程
将TarsCpp的example里面的AuthClient、AuthServer源文件拷贝到对应的测试工程下,然后使用tars2cpp.exe生成Hello.h,然后把文件加到工程里面。然后将C:\tars\cpp目录下的include和lib分别加到工程配置下。
3、修改配置文件
修改AuthServer和AuthClient的config.conf文件,改下IP。
4 运行测试工程
运行AuthServer
运行AuthClient
边栏推荐
- LeetCode·Daily Question·952. Calculate Maximum Component Size by Common Factor·Union Check
- 走进Redis,让你重新认识redis。绝不是表面
- ClickHouse to create a database to create a table view dictionary SQL
- for...in 和 for...of 的区别
- Motion Tuned Spatio-temporal Quality Assessmentof Natural Videos
- ML.NET相关资源整理
- Advanced c language: pointers (5)
- Navicat new database
- 【高等数学】矩阵与向量组的秩和等价
- 类似 MS Project 的项目管理工具有哪些
猜你喜欢

TransGAN代码复现—九天毕昇平台

【Nacos】解决Nacos下载速度缓慢的问题

MySql 5.7.38下载安装教程 ,并实现在Navicat操作MySql

大家都在用的plm项目管理软件有哪些

kubernetes

ClickHouse 创建数据库建表视图字典 SQL

MySQL compressed package installation, fool teaching

NEOVIM下载安装与配置

LeetCode·Daily Question·952. Calculate Maximum Component Size by Common Factor·Union Check

活动推荐 | 2022年深圳最值得参加的边缘计算活动
随机推荐
MySQL 5.7详细下载安装配置教程
系统结构考点之PM2I单级网络
系统结构考点之并行主存
A simple rich text editor
cnpm installation steps
Google Earth Engine ——快速实现MODIS影像NDVI动画的在线加载并导出
MySQL 灵魂 16 问,你能撑到第几问?
【翻译】作为混沌网的LFX门徒的经验
折叠旧版应用程序
mysql去除重复数据
cmd(命令行)操作或连接mysql数据库,以及创建数据库与表
The structure of knowledge in the corners of the C language
Deep Non-Local Kalman Network for VideoCompression Artifact Reduction
登堂入室之soc开发makefile
MYSQL JDBC图书管理系统
The reason for not using bs4 is that the name is too long?Crawl lottery lottery information
深入浅出富文本编辑器
WSL2设置默认启动用户(debian)
类似 MS Project 的项目管理工具有哪些
小心你的字典和样板代码