2
我試圖在Linux上運行薄荷一個C++ PROG時htis錯誤, $使Linux的GETPID系統調用錯誤
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頭文件?假設這是你的程序。 – immibis
[在編譯時獲取錯誤?](http://stackoverflow.com/questions/17836865/getting-errors-while-compiling) – Tsyvarev