Compiler switches in source code

Vinod K Chandran kcvinu82 at
Sun Feb 14 16:58:17 UTC 2021

On Sunday, 14 February 2021 at 08:59:32 UTC, Walter Bright wrote:
> On 2/13/2021 11:56 PM, Vinod K Chandran wrote:
>> Why Compiler Writers Accept instructions for the compiler as 
>> compiler switches rather than through the source code. What's 
>> wrong with providing options like "L/SUBSYSTEM:WINDOWS" 
>> through the source code?
> There are a couple pragmas that do it 
> but people 
> generally prefer to do those with their build system.

Thanks @ Walter Bright
So I can write like this --
pragma(linkerDirective, "L/SUBSYSTEM:WINDOWS")
Am i right ? If so, i would like to know more about like which 
compiler switches are allowed to use with pragmas.

More information about the Digitalmars-d mailing list