Compiling D files on Windows

torhu torhu at yahoo.com
Wed Nov 16 23:47:36 UTC 2022


On Wednesday, 16 November 2022 at 23:16:32 UTC, torhu wrote:
> On Wednesday, 16 November 2022 at 22:02:41 UTC, Larry Hemsley 
> wrote:
>>
>> If any one knows of a magic switch (undocumented or documented)
>> that reverts to the older code view style, I would be very
>> thankful to know it. I do know that cl.exe does have a compiler
>> switch for this, but I do not know if dmd calls cl.exe to do 
>> the
>> linking. From the verbose output it looks like dmd calls the
>> Windows native linker directly.
>
> Does it help to pass the -m32omf switch to dmd? IIRC, it will 
> output CodeView format then.

It seems you used to be able to do this with much older versions 
of the Microsoft linker by using the /PDB:NONE option, but this 
is no longer the case:

"It is not possible to create an .exe or .dll that contains debug 
information. Debug information is always placed in a .obj or .pdb 
file."

https://learn.microsoft.com/en-us/cpp/build/reference/debug-generate-debug-info?view=msvc-170


More information about the Digitalmars-d mailing list