我试图使用使用SetSuspendState方法的c++程序来挂起我的系统,但是我在链接过程中遇到了问题。
我在Windows7OS(64位)上使用g++-4 (GCC) 4.3.4 20090804 (版本) 1编译器。
我写的代码是
#include <iostream>
#include "windows.h"
#include "powrprof.h"
using namespace std;
int main() {
cout << SetSuspendState(false, true, false);
return 0;
}以下是我面临的错误:
/cygdrive/c/Users/Vikas/AppData/Local/Temp/ccFpLgPi.o:suspend.cpp:(.text+0xa4):对`_SetSuspendState@12‘collect2的未定义引用: ld返回了1个退出状态
请帮助我解决这个问题。
提前谢谢..。
https://stackoverflow.com/questions/3739617
复制相似问题