当我尝试在 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()));
修复此问题的步骤是什么,提前致谢。
最佳答案
SYNOPSIS #include <unistd.h>
关于c++ - linux getpid 系统调用错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/34823393/