Here's something I came across that didn't have a good answer when I googled. If you get link errors with MingW32 like:
undefined reference to `GetProcessMemoryInfo@12' or
c:/justinhj/mem.cpp:55: undefined reference to `EnumProcesses@12'
Then you are not linking with the library psapi, and you need it.
To do this just add -lpsapi to your command line. It needs to be last in the list of libraries too!
For your right fight [Comic]
5 hours ago
2 comments:
thanks, just tried the msdn example code to get psapi working, and ran into that, was wondering what I had to link it with ;)
Thanks.
Post a Comment