Hi All,
I am trying to suspend my system using a c++ program using SetSuspendState method but I am facing issue during linking.
I am using g++-4 (GCC) 4.3.4 20090804 (release) 1 compiler on Windows 7 OS (64bit).
The code I have written is
#include <iostream>
#include "windows.h"
#include "powrprof.h"
using namespace std;
int main() {
cout << SetSuspendState(false, true, false);
return 0;
}
Following is the error I am facing:
/cygdrive/c/Users/Vikas/AppData/Local/Temp/ccFpLgPi.o:suspend.cpp:(.text+0xa4): undefined reference to `_SetSuspendState@12' collect2: ld returned 1 exit status
Kindly help me in resolving this issue.
Thanks in advance ...