Re: Trouble with LDC2 and definition file to hide console?

2018-08-21 Thread Kagamin via Digitalmars-d-learn
MS has resource compiler too: https://docs.microsoft.com/en-us/windows/desktop/menurc/resource-compiler

Re: Trouble with LDC2 and definition file to hide console?

2018-08-21 Thread Kagamin via Digitalmars-d-learn
On Monday, 20 August 2018 at 13:42:58 UTC, spikespaz wrote: I would also like to know how to add a PNG or ICO file to my compiled executable. I have icons in the resolutions of 16, 32, 64, 128, 256. Currently I'm adding them in using GitHub's RCEDIT tool (https://github.com/electron/rcedit) but

Re: Trouble with LDC2 and definition file to hide console?

2018-08-20 Thread kinke via Digitalmars-d-learn
For LDC, just rename your main() to WinMain(). Or alternatively, `-L/SUBSYSTEM:WINDOWS -L/ENTRY:mainCRTStartup` in the LDC cmdline.

Re: Trouble with LDC2 and definition file to hide console?

2018-08-20 Thread kinke via Digitalmars-d-learn
On Monday, 20 August 2018 at 13:49:19 UTC, rikki cattermole wrote: That is for Optlink not for MSVC link which ldc uses. Exactly. For LDC, just rename your main() to WinMain().

Re: Trouble with LDC2 and definition file to hide console?

2018-08-20 Thread rikki cattermole via Digitalmars-d-learn
On 21/08/2018 1:42 AM, spikespaz wrote: I am trying to add a *.def file to my program to hide the console window on launch, as it doesn't need to display anything to function. It is a Windows only application. I saw at this post (https://forum.dlang.org/post/ilj5vn$ef4$1...@digitalmars.com) t

Re: Trouble with LDC2 and definition file to hide console?

2018-08-20 Thread spikespaz via Digitalmars-d-learn
On Monday, 20 August 2018 at 13:42:58 UTC, spikespaz wrote: I am trying to add a *.def file to my program to hide the console window on launch, as it doesn't need to display anything to function. It is a Windows only application. [...] Also adding that the linker flag I have stated above als

Trouble with LDC2 and definition file to hide console?

2018-08-20 Thread spikespaz via Digitalmars-d-learn
I am trying to add a *.def file to my program to hide the console window on launch, as it doesn't need to display anything to function. It is a Windows only application. I saw at this post (https://forum.dlang.org/post/ilj5vn$ef4$1...@digitalmars.com) that I could either use a linker flag, -L