v icon indicating copy to clipboard operation
v copied to clipboard

windows gg apps runs without having a window when launched from a file explorer

Open Eliyaan opened this issue 2 months ago • 1 comments

Describe the bug

(On windows) When running an app made with gg that tries to print a string from a file explorer, the process starts but never spawns a window.

Reproduction Steps

(only on windows) add println('Hello') as the first line of the main function of the 2048 example compile it with v . run the executable from the file explorer, the process will start but no window shows up because it will hang on the print. (but it works if launched from a terminal)

Expected Behavior

To be able to launch gg apps from the file explorer.

V version

V 0.4.12 c3e0637

Environment details (OS name and version, etc.)

windows 11 pro education 26100 64 bits cc version: N/A gcc version: N/A clang version: N/A msvc version: N/A tcc version: tcc version 0.9.27 (x86_64 Windows)

Eliyaan avatar Nov 29 '25 14:11 Eliyaan

when cross compiling from linux to windows this happens when passing -subsystem windows (as it is the default for gg apps on windows but not the default when cross compiling gg apps to windows seemingly) without passing this, the app will open its window and a terminal window to print.

Eliyaan avatar Nov 29 '25 15:11 Eliyaan