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

来源:互联网 发布:mac目录结构 编辑:程序博客网 时间:2024/05/30 04:30

[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

阅读全文
0 0
原创粉丝点击