xmake-io / xmake

🔥 A cross-platform build utility based on Lua
https://xmake.io
Apache License 2.0
10.14k stars 782 forks source link

xmake qt.widgetapp规则无法配置将日志输出到终端 #5430

Closed aiyolo closed 3 months ago

aiyolo commented 3 months ago

Xmake Version

v2.9.2+HEAD.6b6557c54

Operating System Version and Architecture

windows11

Describe Bug

  1. 创建工程
    xmake create -t qt.widgetapp test
  2. 运行,日志没有输出到终端

Expected Behavior

应该支持是否输出日志到终端。

Project Configuration

target("test")
    add_rules("qt.widgetapp")
    add_headerfiles("src/*.h")
    add_files("src/*.cpp")
    add_files("src/mainwindow.ui")

Additional Information and Error Logs

nothing

Issues-translate-bot commented 3 months ago

Bot detected the issue body's language is not English, translate it automatically.


Title: xmake qt.widgetapp rule cannot be configured to output logs to the terminal

star-hengxing commented 3 months ago

add_ldflags("/subsystem:console")

waruqi commented 3 months ago

默认 gui 程序 windows subsystem 当然不会回显到 console,这个你要自己按上面方式配,或者自己代码里另开 console 绑定 stdout

这个跟 xmake 又没啥关系,自己 google 下 win gui程序如何终端输出?

Issues-translate-bot commented 3 months ago

Bot detected the issue body's language is not English, translate it automatically.


Of course, the default gui program windows subsystem will not echo to the console. You have to configure this yourself according to the above method, or open a separate console in your own code to bind stdout.

This has nothing to do with xmake. If you google the win gui program yourself, what if the terminal outputs it?

aiyolo commented 3 months ago

Thank you!