www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 23256] New: must supply -mscrtlib manually when compiling for


          Issue ID: 23256
           Summary: must supply -mscrtlib manually when compiling for
           Product: D
           Version: D2
          Hardware: All
                OS: Windows
            Status: NEW
          Severity: normal
          Priority: P1
         Component: dmd
          Assignee: nobody puremagic.com
          Reporter: bugzilla digitalmars.com

When compiling a file:

    void func() { }

on a non-Windows system, and cross compiling it to Windows with:

    dmd -c test.d -os=windows

it fails with the message:

    Error: must supply `-mscrtlib` manually when cross compiling to windows

But mscrtlib is only necessary when trying to link a windows object file, not
just create it.

Jul 16 2022