My question is similar to this question. However, in this case I can't find any copy of psapi.a
or psapi.lib
in my \MingGW64\lib
folder although psapi.h
does exist in \MingGW64\x86_64-w64-mingw32\include
.
The error code is undefined reference to `GetProcessMemoryInfo'
.
My OS is Windows 10 and g++ version is 4.9.2. The compiling command was g++ std=c++11 -Wall -DPSAPI_VERSION=1 -D LOCAL *.cpp -o *