C++ 编译测试与 POSIX 套接字编程指南
编译与测试
要编译代码,我们可以使用与其他示例相同的 CMakeLists.txt 文件,链接如下:https://github.com/PacktPublishing/Hands-On-System-Programming-with-CPP/blob/master/Chapter09/CMakeLists.txt 。以下是具体的编译步骤:
git clone https://github.com/PacktPublishing/Hands-On-System-Programming-with-CPP.git
cd Hands-On-System-Programming-with-CPP/Chapter09/
mkdir build
cd build
cmake -DCMAKE_BUILD_TYPE=Release ..
make
执行示例的命令如下:
./example7
示例的输出应该类似于以下内容:
0x7ffca71d7a00 constructor, sizeof(T): 24
[TEST] add many:
- time1: 3921793
- time2: 1787499
0x7fff14709720 constructor, sizeof(T): 24
[TEST] remove many:
- t
超级会员免费看
订阅专栏 解锁全文
8

被折叠的 条评论
为什么被折叠?



