c++ 为什么空的wWinMain()会打开我的鼠标设置?[关闭]

2fjabf4q  于 11个月前  发布在  其他
关注(0)|答案(1)|浏览(98)

**已关闭。**此问题需要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的数据

pbwdgjma

pbwdgjma1#

在PowerShell中,命令必须指定可执行文件的路径,或者可执行文件必须位于PATH环境变量中包含的路径中。
要在 * 当前工作目录 * 中运行可执行文件main.exe,命令必须是:.\main
当您单独发出main时,您将启动控制面板小程序:C:\Windows\System32\main.cpl

相关问题