-
Notifications
You must be signed in to change notification settings - Fork 257
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[mingw64] [mpv.com] [clang] No console output #1794
Comments
Hmm gcc PS D:\mabs> file .\local64\bin-video\mpv.com
.\local64\bin-video\mpv.com: PE32+ executable (console) x86-64 (stripped to external PDB), for MS Windows
PS D:\mabs> file .\local64\bin-video\mpv.exe
.\local64\bin-video\mpv.exe: PE32+ executable (GUI) x86-64 (stripped to external PDB), for MS Windows clang PS D:\> file $(Get-Command mpv.com).Source
D:\media-autobuild_suite\local64\bin-video\mpv.com: PE32+ executable (GUI) x86-64 (stripped to external PDB), for MS Windows
PS D:\> file $(Get-Command mpv).Source
D:\media-autobuild_suite\local64\bin-video\mpv.com: PE32+ executable (GUI) x86-64 (stripped to external PDB), for MS Windows |
mpv.com builds here: I think the problem is:
GCC gives priority to -mconsole and ignores -mwindows |
Interestingly, I can't tell where the mwindows comes from, but for |
What happens if you remove |
And why does GCC prefer |
Actually, they're supposed to not be exclusive:
@Ajaja how about if you replace |
It's easy to check
So, looks like |
Can you check it with `gcc` too (not using `-mconsole` and instead
`-Wl,--subsystem,console`)? I think it should work.
…On Thu, 10 Sep 2020 at 18:52, Ajaja ***@***.***> wrote:
It's easy to check
$ clang -o mpv.com -mwindows -municode -mconsole win32-console-wrapper.c
clang: warning: argument unused during compilation: '-mconsole' [-Wunused-command-line-argument]
$ file mpv.commpv.com: PE32+ executable (GUI) x86-64, for MS Windows
$ clang -o mpv.com -municode -mconsole -mwindows win32-console-wrapper.c
clang: warning: argument unused during compilation: '-mconsole' [-Wunused-command-line-argument]
$ file mpv.commpv.com: PE32+ executable (GUI) x86-64, for MS Windows
$ gcc -o mpv.com -mwindows -municode -mconsole win32-console-wrapper.c
$ file mpv.commpv.com: PE32+ executable (console) x86-64, for MS Windows
$ gcc -o mpv.com -municode -mconsole -mwindows win32-console-wrapper.c
$ file mpv.commpv.com: PE32+ executable (console) x86-64, for MS Windows
$ clang -o mpv.com -municode -Wl,--subsystem,console -mwindows win32-console-wrapper.c
$ file mpv.commpv.com: PE32+ executable (console) x86-64, for MS Windows
$ clang -o mpv.com -mwindows -municode -Wl,--subsystem,console win32-console-wrapper.c
$ file mpv.commpv.com: PE32+ executable (console) x86-64, for MS Windows
So, looks like -Wl,--subsystem,console works.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#1794 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAA3H5NU3XCYYZJRODOH63LSFEG5JANCNFSM4QHGGL2Q>
.
|
@wiiaboo
|
Fixes an issue with clang not using the -mconsole option if mwindows is present resulting in mpv.com being a gui program instead of a console program. Does not interfere with gcc compilation. result without this patch ``` file .\mpv.com .\mpv.exe .\mpv.com: PE32+ executable (GUI) x86-64 (stripped to external PDB) .\mpv.exe: PE32+ executable (GUI) x86-64 (stripped to external PDB) ``` both executables open the mpv gui with out console output. result with this patch ``` file .\mpv.com .\mpv.exe .\mpv.com: PE32+ executable (console) x86-64 (stripped to external PDB) .\mpv.exe: PE32+ executable (GUI) x86-64 (stripped to external PDB) ``` mpv.com properly outputs text to console instead of instantly opening a gui `, for MS Windows` removed from the end of file outputs to reduce col count m-ab-s/media-autobuild_suite#1794 Signed-off-by: Christopher Degawa <ccom@randomderp.com>
Fixes an issue with clang not using the -mconsole option if mwindows is present resulting in mpv.com being a gui program instead of a console program. Does not interfere with gcc compilation. result without this patch ``` file .\mpv.com .\mpv.exe .\mpv.com: PE32+ executable (GUI) x86-64 (stripped to external PDB) .\mpv.exe: PE32+ executable (GUI) x86-64 (stripped to external PDB) ``` both executables open the mpv gui with out console output. result with this patch ``` file .\mpv.com .\mpv.exe .\mpv.com: PE32+ executable (console) x86-64 (stripped to external PDB) .\mpv.exe: PE32+ executable (GUI) x86-64 (stripped to external PDB) ``` mpv.com properly outputs text to console instead of instantly opening a gui `, for MS Windows` removed from the end of file outputs to reduce col count m-ab-s/media-autobuild_suite#1794 Signed-off-by: Christopher Degawa <ccom@randomderp.com>
Built with clang
mpv.com
does not show console output. It behaves the same way asmpv.exe
.The text was updated successfully, but these errors were encountered: