From f8c54c190b2f422dee103bae4e0d11b50094b481 Mon Sep 17 00:00:00 2001 From: ruki Date: Mon, 9 Sep 2019 10:28:37 +0800 Subject: Update load.lua --- xmake/rules/qt/load.lua | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/xmake/rules/qt/load.lua b/xmake/rules/qt/load.lua index 329aaa447..03ebf0402 100644 --- a/xmake/rules/qt/load.lua +++ b/xmake/rules/qt/load.lua @@ -232,8 +232,11 @@ function main(target, opt) -- is gui application? if opt.gui then -- add -subsystem:windows for windows platform - if is_plat("windows", "mingw") then + if is_plat("windows") then + target:add("defines", "_WINDOWS") target:add("ldflags", "-subsystem:windows", "-entry:mainCRTStartup", {force = true}) + elseif is_plat("mingw") then + target:add("ldflags", "-Wl,-subsystem:windows", "-Wl,-entry:mainCRTStartup", {force = true}) end end -- cgit v1.3.1