我正在尝试运行一些使用谷歌基准的代码。我正试着用哥德波特和一些同事分享。它似乎支持谷歌基准作为一个库,你可以选择,但我不能让它编译。
这就是链接。
它使用gcc 7.3提供了以下选项:
-std=c++17 -O3 -lbenchmark
我尝试添加-lbenchmark
和-lbenachmark-main
。没有人能解决这个问题。
这就是我要犯的错误
ASM generation compiler returned: 0
/opt/compiler-explorer/gcc-7.3.0/bin/../lib/gcc/x86_64-linux-gnu/7.3.0/../../../../x86_64-linux-gnu/bin/ld: cannot find -lbenchmark
collect2: error: ld returned 1 exit status
Execution build compiler returned: 1
发布于 2019-09-20 15:45:59
如何使用谷歌的基准测试
照现在的样子-你不能。
发布于 2021-04-08 07:50:39
天哪,让你#包括在网址上。
#include "https://raw.githubusercontent.com/google/benchmark/master/include/benchmark/benchmark.h"
发布于 2021-02-22 21:21:44
现在您可以使用快速工作台进行微基准测试。只需单击戈德螺栓中的快速工作台链接,或转到:https://quick-bench.com/,它支持google基准测试。
对于代码示例:https://quick-bench.com/q/X4VuveQHPfc8fFrk8sbbMEoVVx0
https://stackoverflow.com/questions/58035773
复制