当前位置: 首页 > 工具软件 > Bonnie++ > 使用案例 >

bonnie++安装报错zcav.cpp:73: error: ‘strdup’ was not declared in this scope

孙胜泫
2023-12-01

[root@localhost bonnie++-1.03a]# make

g++ -O2  -DNDEBUG -Wall -W -Wshadow -Wpointer-arith -Wwrite-strings -pedantic -ffor-scope   zcav.cpp -o zcav bon_suid.o
zcav.cpp: In function ‘int main(int, char**)’:
zcav.cpp:73: error: ‘strdup’ was not declared in this scope

zcav.cpp:112: error: ‘strcmp’ was not declared in this scope


解决办法:在zcav.cpp中加入

#include<string.h>

https://stackoverflow.com/questions/40766055/error-strdup-was-not-declared-in-this-scope

 类似资料: