[英]linux getpid System call error
尝试在linux-mint上运行c ++ prog时出现htis错误,$ make
g++ -c -O3 common.cc
common.cc: In function ‘float getCurrentMemoryUsage()’:
common.cc:11:40: error: ‘getpid’ was not declared in this scope
string pid = intToStr(unsigned(getpid()));
要解决此问题的步骤是什么,请先谢谢。
SYNOPSIS #include <unistd.h>
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.