繁体   English   中英

linux getpid系统调用错误

[英]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()));

要解决此问题的步骤是什么,请先谢谢。

getpid(3)手册页中

 SYNOPSIS #include <unistd.h> 

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM