当前位置:网站首页>gtest从一无所知到熟练运用(1)gtest安装
gtest从一无所知到熟练运用(1)gtest安装
2022-07-04 20:48:00 【奇妙之二进制】
1、从源代码安装
下载gtest,release-1.8.0
git clone https://github.com/google/googletest
gtest编译
cd googletest
生成Makefile文件(先安装cmake,brew install cmake),继续输入命令编译:
cmake CMakeLists.txt
执行make,生成两个静态库:libgtest.a libgtest_main.a
make
拷贝到系统目录,注意,如果下诉目录位置在不同版本位置有变动,用find . -name “libgtest*.a” 找到位置
sudo cp libgtest*.a /usr/lib
sudo cp –a include/gtest /usr/include
检查是否安装成功
可以写一个简单的测试代码如下:
#include<gtest/gtest.h>
int add(int a边栏推荐
猜你喜欢

Three or two things about the actual combat of OMS system

torch. Tensor and torch The difference between tensor

奋斗正当时,城链科技战略峰会广州站圆满召开

解析steam教育中蕴含的众创空间

Stealing others' vulnerability reports and selling them into sidelines, and the vulnerability reward platform gives rise to "insiders"
![Compréhension approfondie du symbole [langue C]](/img/4b/26cf10baa29eeff08101dcbbb673a2.png)
Compréhension approfondie du symbole [langue C]

Lambdaquerywrapper usage

How to use concurrentlinkedqueue as a cache queue

Difference between ApplicationContext and beanfactory (MS)

ArcGIS 10.2.2 | solution to the failure of ArcGIS license server to start
随机推荐
redis发布订阅的使用
redis缓存
[weekly translation go] how to code in go series articles are online!!
开源之夏专访|Apache IoTDB社区 新晋Committer谢其骏
[buuctf.reverse] 151_[FlareOn6]DnsChess
How was MP3 born?
Hash table
WGCNA分析基本教程总结
杰理之AD 系列 MIDI 功能说明【篇】
Methods of improving machine vision system
Golang interview finishing three resumes how to write
Jerry's ad series MIDI function description [chapter]
At the right time, the Guangzhou station of the city chain science and Technology Strategy Summit was successfully held
Arcgis 10.2.2 | arcgis license server无法启动的解决办法
Jerry's ad series MIDI function description [chapter]
Huawei ENSP simulator enables devices of multiple routers to access each other
Daily question -leetcode1200- minimum absolute difference - array - sort
华为模拟器ensp常用命令
面试官:说说XSS攻击是什么?
Lambdaquerywrapper usage