为什么我看到一个控制台窗口,当我运行一个动态编译EXE?当我、控制台、窗口、动态

2023-09-04 05:09:51 作者:█流言蜚语つ

所以我有一个程序在点击按钮动态编译一个新的计划。

So I have a program that dynamically compiles a new program at the click of a button.

新的程序生成和完美的作品。

The new program generates and works perfectly.

唯一奇怪的是,当我运行这个新生成的exe文件,首先一个控制台窗口打开,标题是C:\ calculator.exe

The only weird thing is that when I run this newly generated exe, first a console window opens, the title is "C:\calculator.exe"

然后我calculator.exe程序打开。

and then my calculator.exe program opens.

出于某种原因,它已经开始在控制台窗口,我不知道为什么。

For some reason it is starting the console window and I'm not sure why.

有什么建议?

推荐答案

您使用命令行编​​译器?如果是这样,请尝试使用 /目标:winexe 而不是 /目标:exe文件

Are you using the command line compiler? If so, try using /target:winexe instead of /target:exe.