Walnut icon indicating copy to clipboard operation
Walnut copied to clipboard

Can't set SubSystem to WindowedApp

Open Patrick-W-McMahon opened this issue 1 year ago • 1 comments

If you go /WalnutApp/premake5.lua and change the following: kind "ConsoleApp" to kind "WindowedApp" then run premake it will build the project but when running the project you will get the following error.

Severity Code Description Project File Line Suppression State Details Error LNK2019 unresolved external symbol WinMain referenced in function "int __cdecl invoke_main(void)" (?invoke_main@@YAHXZ) WalnutApp .....\Walnut\WalnutApp\MSVCRTD.lib(exe_winmain.obj) 1

the only way the project works is in Console but i would like to build it so it doesn't show the console at startup

Patrick-W-McMahon avatar Oct 24 '24 12:10 Patrick-W-McMahon

@Patrick-W-McMahon if i remember correctly you should change the entry point, the default entry point is changed when kind is set to WindowedApp!

linkoptions { "/ENTRY:main" }

this should do the job

if not you can always ask over at premake

lolrobbe2 avatar Jan 17 '25 14:01 lolrobbe2