**已关闭。**此问题需要debugging details。目前不接受回答。
编辑问题以包括desired behavior, a specific problem or error, and the shortest code necessary to reproduce the problem。这将帮助其他人回答问题。
43分钟前关闭
Improve this question的
我写了一个代码片段,其中包括<windows.h>
,有wWinMain()
函数及其正常参数,它只是在函数体中有return 0
。
现在,当我用g++ main.cpp -o main -municode; main
编译它的时候,它突然打开了我的鼠标设置窗口。为什么它会这样工作?我不明白。
#include <windows.h>
int WINAPI wWinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, PWSTR pCmdLine, int nCmdShow) {
return 0;
}
字符串
我希望它什么也不做,但现在它打开我的鼠标设置窗口-如何?
x1c 0d1x的数据
1条答案
按热度按时间pbwdgjma1#
在PowerShell中,命令必须指定可执行文件的路径,或者可执行文件必须位于
PATH
环境变量中包含的路径中。要在 * 当前工作目录 * 中运行可执行文件
main.exe
,命令必须是:.\main
。当您单独发出
main
时,您将启动控制面板小程序:C:\Windows\System32\main.cpl
。