尝试在linux-mint上运行c++ prog时出现此错误,
$ 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) man page:

关于c++ - linux getpid系统调用错误,我们在Stack Overflow上找到一个类似的问题:https://stackoverflow.com/questions/34823393/

10-11 08:43