digitalmars.D.learn - -L/SUBSYSTEM:windows Error when using -m64
- Marcone (6/7) Aug 10 2021 How use -L/SUBSYSTEM:windows for hide console in x64 prograns?
- Adam D Ruppe (2/3) Aug 10 2021 http://dpldocs.info/experimental-docs/arsd.simpledisplay.html#installati...
- Marcone (3/6) Aug 10 2021 Hi, do you have some other solution without arsd.simpledisplay? I
- Adam D Ruppe (4/6) Aug 10 2021 Did you read the paragraph under the link? That IS a dmd switch.
- Marcone (2/8) Aug 10 2021 Using -Lgdi32.lib -Luser32.lib? Same error.
- Adam D Ruppe (5/6) Aug 10 2021 The part after that:
- Marcone (2/8) Aug 10 2021 Good! work very well! Thank you!
- Mike Parker (9/21) Aug 10 2021 The difference is because DMD uses different linkers on Windows.
How use -L/SUBSYSTEM:windows for hide console in x64 prograns? Becouse if I use -L/SUBSYSTEM:windows and -m64 I get this error: lld-link: error: undefined symbol: WinMainError: linker exited with status 1 If I delete -L/SUBSYSTEM:windows compile fine. How can I hide console using -m64?referenced by msvcrt120.lib(msvcrt_stub2.obj):($LN5)
Aug 10 2021
On Tuesday, 10 August 2021 at 18:34:03 UTC, Marcone wrote:How can I hide console using -m64?http://dpldocs.info/experimental-docs/arsd.simpledisplay.html#installation-instructions
Aug 10 2021
On Tuesday, 10 August 2021 at 18:36:27 UTC, Adam D Ruppe wrote:On Tuesday, 10 August 2021 at 18:34:03 UTC, Marcone wrote:Hi, do you have some other solution without arsd.simpledisplay? I want only dmd feature.How can I hide console using -m64?http://dpldocs.info/experimental-docs/arsd.simpledisplay.html#installation-instructions
Aug 10 2021
On Tuesday, 10 August 2021 at 18:45:35 UTC, Marcone wrote:Hi, do you have some other solution without arsd.simpledisplay? I want only dmd feature.Did you read the paragraph under the link? That IS a dmd switch. Or a ldc switch. It explains the concept which works with anything.
Aug 10 2021
On Tuesday, 10 August 2021 at 18:51:28 UTC, Adam D Ruppe wrote:On Tuesday, 10 August 2021 at 18:45:35 UTC, Marcone wrote:Using -Lgdi32.lib -Luser32.lib? Same error.Hi, do you have some other solution without arsd.simpledisplay? I want only dmd feature.Did you read the paragraph under the link? That IS a dmd switch. Or a ldc switch. It explains the concept which works with anything.
Aug 10 2021
On Tuesday, 10 August 2021 at 18:59:33 UTC, Marcone wrote:Using -Lgdi32.lib -Luser32.lib? Same error.The part after that: If you want the Windows subsystem too, use -L/subsystem:windows -L/entry:mainCRTStartup. Pass BOTH -L/subsystem:windows AND -L/entry:mainCRTStartup
Aug 10 2021
On Tuesday, 10 August 2021 at 19:01:42 UTC, Adam D Ruppe wrote:On Tuesday, 10 August 2021 at 18:59:33 UTC, Marcone wrote:Good! work very well! Thank you!Using -Lgdi32.lib -Luser32.lib? Same error.The part after that: If you want the Windows subsystem too, use -L/subsystem:windows -L/entry:mainCRTStartup. Pass BOTH -L/subsystem:windows AND -L/entry:mainCRTStartup
Aug 10 2021
On Tuesday, 10 August 2021 at 19:03:06 UTC, Marcone wrote:On Tuesday, 10 August 2021 at 19:01:42 UTC, Adam D Ruppe wrote:The difference is because DMD uses different linkers on Windows. By default, it links 32-bit programs with OPTLINK. That linker only requires the subsystem flag---it will recognize that you have a `main` function. When compiling with -m32mscoff or -m64, it uses the Microsoft linker. That linker requires that you also specify the program entry function---it always expects `WinMain`, and the `mainCRTStartup` tells it to look for `main` instead.On Tuesday, 10 August 2021 at 18:59:33 UTC, Marcone wrote:Good! work very well! Thank you!Using -Lgdi32.lib -Luser32.lib? Same error.The part after that: If you want the Windows subsystem too, use -L/subsystem:windows -L/entry:mainCRTStartup. Pass BOTH -L/subsystem:windows AND -L/entry:mainCRTStartup
Aug 10 2021